2017 © Pedro Peláez
 

yii2-extension yii2-documents

image

nullref/yii2-documents

  • Wednesday, April 25, 2018
  • by ZAYEC77
  • Repository
  • 2 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 33 % Grown

The README.md

Yii2 Documents

WIP, (*1)

Module for processing documents, (*2)

Introducing

This module allows you create own document's workers with few levels of customization: - worker code - worker instance - document instance, (*3)

All workers run under default yii2 queue, (*4)

Installation

The preferred way to install this extension is through composer., (*5)

Either run, (*6)

php composer.phar require --prefer-dist nullref/yii2-documents "*"

or add, (*7)

"nullref/yii2-documents": "*"

to the require section of your composer.json file., (*8)

Then you have run console command for install this module and run migrations:, (*9)

php yii module/install nullref/yii2-documents

This command will add current module to config/installed_modules.php file., (*10)

This file need be included in application config., (*11)

If you don't want to use module/install command that you could add module to you application config manually:, (*12)

'modules' => [
    //...
    'documents' => [
        'class' => nullref\documents\Module::class,
    ],
    //...
],

Than you need run, (*13)

php yii modules-migrate --moduleId=documents

Also, you have install yiisoft/yii2-queue following it own manual., (*14)

Configuration

After installation you need create own classes that implement export/import logic., (*15)

For example you can check demo folder., (*16)

After creating document worker you need register it in module config:, (*17)

    'documents' => [
        'class' => nullref\documents\Module::class,
        'importers' => [
            // List of importer classes
            'catalog' => [
                'class' => \app\components\importers\CatalogImporter::class,
            ],
        ],
        'exporters' => [
            // List of exporter classes
            'total' => [
                'class' => app\components\exporters\TotalExporter::class,
            ],
        ],
    ],

Usage

Please, check docs and demo for more info., (*18)

Customization

And translations, (*19)

The Versions