mediabet-concepture / yii2-user-module
package under development
v4.0.7
2020-08-21 09:07 UTC
Requires
- php: >=5.6.0
- yiisoft/yii2: 2.0.29
- yiisoft/yii2-authclient: 2.2.7
- yiisoft/yii2-jui: ~2.0.0
README
concepture_engine
https://klisl.com/yii2-extension.html
composer.json
"require": {
"concepture/core" : "*",
"concepture/yii2-core" : "*",
"concepture/yii2-user" : "*"
}
"extra": {
"bootstrap": "concepture\\user\\Bootstrap"
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
},
{
"type": "path",
"url": "concepture/yii2-user",
"options": {
"symlink": true
}
}
]
Подключение
"require": {
"concepture/yii2-user-module" : "dev-master"
},
Миграции php yii migrate/up --migrationPath=@concepture/yii2user/console/migrations --interactive=0 php yii migrate --migrationPath=@yii/rbac/migrations --interactive=0
Подключение модуля для админки
'modules' => [
'user' => [
'class' => 'concepture\yii2user\Module'
],
],
Для переопределния контроллера добавялем в настройки модуля
'modules' => [
'static' => [
'class' => 'concepture\yii2user\Module',
'controllerMap' => [
'user' => 'backend\controllers\UserController'
],
],
],
Для переопределния папки с представленяими добавялем в настройки модуля
'modules' => [
'static' => [
'class' => 'concepture\yii2user\Module',
'viewPath' => '@backend/views'
],
],
Для переопределния любого класса можно вооспользоваться инекцией зависимостей через config.php К примеру подменить модель StaticBlock на свой
<?php
return [
'container' => [
'definitions' => [
'concepture\yii2static\models\StaticBlock' => ['class' => 'backend\models\StaticBlock'],
],
],
]