developeruz / yii2-db-rbac

Dynamic control of access rights in YII2
MIT License
110 stars 33 forks source link

Изменение темы для модуля (baseApp) #28

Closed AlexBad closed 8 years ago

AlexBad commented 8 years ago

developeruz\db_rbac\Yii2DbRbac

public $theme = false;

public function init()
{
        parent::init();
        $this->registerTranslations();

        if($this->theme){
            Yii::$app->view->theme = new \yii\base\Theme($this->theme);
        }
    }

Config>Web.php

'modules' => [
        ...
        'permit' => [
            'class' => 'developeruz\db_rbac\Yii2DbRbac',
            'theme' => [
                'pathMap' => [
                    '@app/views' => '@app/themes/AdminLTE/views'
                ],
            ]
        ],
       ...
    ],