Yii2 Category
, (*1)
Module for categories (WIP), (*2)
, (*3)
Installation
The preferred way to install this extension is through composer., (*4)
Either run, (*5)
php composer.phar require --prefer-dist nullref/yii2-category "*"
or add, (*6)
"nullref/yii2-category": "*"
to the require section of your composer.json
file., (*7)
Then You have run console command for install this module:, (*8)
php yii module/install nullref/yii2-category
and module will be added to your application config (@app/config/installed_modules.php
), (*9)
Pay attention that if you don't use our application template
it needs to change config files structure to have ability run commands that show above., (*10)
Please check this documentation section, (*11)
, (*12)
Module integration
If you need additional information about integration current module with your project, please check example folder, (*13)
Using with admin module
You can use this module with modules:
- Yii2 Admin.
- Yii2 Full Admin., (*14)
Models overriding
'category' => [
'class' => 'nullref\category\Module',
'classMap' => [
'Category' => 'app\models\Category',
'CategoryQuery' => 'app\models\CategoryQuery',
],
],
Also you have to add module to bootstrap list of application:, (*15)
...
'bootstrap' => ['category',...],
...