esempla / yii2-classifiers
Esempla Classifiers Module
1.2.4
2018-10-29 08:43 UTC
Requires
- php: >=7.1.0
- 2amigos/yii2-arrayquery-component: >=1.0.3
- kartik-v/yii2-builder: >=1.0.0
- kartik-v/yii2-datecontrol: *
- kartik-v/yii2-number: >=1.0.0
- kartik-v/yii2-widget-datetimepicker: *
- kartik-v/yii2-widgets: *
- wbraganca/yii2-fancytree-widget: >=1.0.1
- yiisoft/yii2: >=2.0.1
- yiisoft/yii2-composer: >=2.0.1
- yiisoft/yii2-elasticsearch: ^2.0
README
Installation
The preferred way to install this extension is through composer.
Note: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the
minimum-stability
settings for your application's composer.json.
Either run
$ php composer.phar require esempla/yii2-classifiers "1.0.*"
or add
"esempla/yii2-classifiers": "1.0.*"
to the `
require`
section of your composer.json
file.
Migrations
The extension has been created with database table. You should execute database migrations.(PostgreSQL ® recommended)
php yii migrate/up create_sys_classifiers_table --migrationPath="vendor/esempla/yii2-classifiers/src/migrations"
Module
The extension has been created as a module. You should configure the module with a name of authManager
as shown below:
'modules' => [
...
'Classifier' => [
'class' => 'classifier\ClassifierModule',
'params'=>[
'controllerNS'=>"namespace_of_your_controllers",//default to "classifier\\controllers\\"
'modelNS'=>"namespace_of_your_models",//default to "classifier\\models"
'classifierBaseUrl'=>"base_url_of_your_classifier's_controllers" //default to "/Classifier";
'migrationsPath'=>"path_to_your_migration_dir" //default to Yii::getAlias("@console") . DIRECTORY_SEPARATOR . "migrations" ;
]
],
'classifiercreator' => [
'class' => 'classifier\modules\ClassifierCreator\Classifier',
],
...
],
And set aliasies for src path(/common/main.php recommanded)
'aliases' => [
...
'@classifier' => '@vendor/esempla/yii2-classifiers/src',
],
Add in bootstrap.php in common or backend
Yii::setAlias('@classifier', dirname(dirname(__DIR__)) . '/vendor/esempla/yii2-classifiers/src');
Important ! set file access by example
sudo chown -R root:www-data console/migrations
sudo chown -R root:www-data vendor/esempla/yii2-classifiers/src/models vendor/esempla/yii2-classifiers/src/views vendor/esempla/yii2-classifiers/src/controllers/
To acces module
Go to http:://you_server/Classifier