mediabet-concepture/yii2-user-module

package under development

Installs: 636

Dependents: 0

Suggesters: 0

Security: 0

Type:yii2-extension

v4.0.7 2020-08-21 09:07 UTC

This package is auto-updated.

Last update: 2024-10-16 22:08:26 UTC


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'],
         ],
     ],
 ]