nullref / yii2-documents
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4.0
- nullref/yii2-core: >=0.0.3
- nullref/yii2-useful: >=0.0.3
- rmrevin/yii2-fontawesome: >=2.16.0
- yiisoft/yii2: >=2.0.13
- yiisoft/yii2-queue: >=2.0.0
Requires (Dev)
Suggests
- phpoffice/phpspreadsheet: Need for Spreadsheet
This package is auto-updated.
Last update: 2024-11-29 05:26:50 UTC
README
WIP
Module for processing documents
Introducing
This module allows you create own document's workers with few levels of customization:
- worker code
- worker instance
- document instance
All workers run under default yii2 queue
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist nullref/yii2-documents "*"
or add
"nullref/yii2-documents": "*"
to the require section of your composer.json
file.
Then you have run console command for install this module and run migrations:
php yii module/install nullref/yii2-documents
This command will add current module to config/installed_modules.php file.
This file need be included in application config.
If you don't want to use module/install
command that you could add module to you application config manually:
'modules' => [ //... 'documents' => [ 'class' => nullref\documents\Module::class, ], //... ],
Than you need run
php yii modules-migrate --moduleId=documents
Also, you have install yiisoft/yii2-queue following it own manual.
Configuration
After installation you need create own classes that implement export/import logic.
For example you can check demo folder.
After creating document worker you need register it in module config:
'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.
Customization
And translations