'app-backend', 'language' => 'ru_RU', 'basePath' => dirname(__DIR__), 'aliases' => [ '@staticRoot' => $params['staticPath'], '@static' => $params['staticHostInfo'], ], 'controllerNamespace' => 'backend\controllers', 'bootstrap' => [ 'log', 'common\bootstrap\SetUp', 'backend\bootstrap\SetUp', ], 'modules' => [ 'elfinder' => [ 'class' => 'core\components\elfinder\ElFinderModule', ], ], /*'controllerMap' => [ 'elfinder' => [ 'class' => 'mihaildev\elfinder\Controller', 'access' => ['@'], 'plugin' => [ [ 'class'=>'\mihaildev\elfinder\plugin\Sluggable', 'lowercase' => true, 'replacement' => '-' ] ], 'roots' => [ [ 'baseUrl'=>'@static', 'basePath'=>'@staticRoot', 'path' => 'files', 'name' => 'Global' ], ], ], ],*/ 'controllerMap' => [ 'elfinder' => [ 'class' => 'zertex\elfinder\Controller', 'access' => ['@'], 'plugin' => [ [ 'class'=>'\zertex\elfinder\plugin\Sluggable', 'lowercase' => true, 'replacement' => '-' ] ], 'roots' => [ [ 'baseUrl'=>'@static', 'basePath'=>'@staticRoot', 'path' => 'files', 'name' => 'Global' ], ], ], ], 'components' => [ 'request' => [ 'baseUrl' => '', 'csrfParam' => '_csrf-backend', 'cookieValidationKey' => $params['cookieValidationKey'], ], 'user' => [ 'identityClass' => 'common\auth\Identity', 'enableAutoLogin' => true, 'identityCookie' => [ 'name' => '_identity', 'httpOnly' => true, 'domain' => $params['cookieDomain'], ], 'loginUrl' => ['auth/login'], ], 'session' => [ 'name' => '_session', 'class' => 'yii\web\DbSession', 'writeCallback' => function($session){ return [ 'user_id' => Yii::$app->user->id ]; }, 'cookieParams' => [ 'domain' => $params['cookieDomain'], 'httpOnly' => true, ], ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'errorHandler' => [ 'errorAction' => 'site/error', ], 'backendUrlManager' => require __DIR__ . '/urlManager.php', 'frontendUrlManager' => require __DIR__ . '/../../frontend/config/urlManager.php', 'urlManager' => function () { return Yii::$app->get('backendUrlManager'); }, 'i18n' => [ 'translations' => [ 'main' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@backend/messages', ], 'dashboard' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@backend/messages', ], 'menu' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@backend/messages', ], 'page' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@backend/messages', ], 'user' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@backend/messages', ], 'post' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@backend/messages', ], 'buttons' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@backend/messages', ], 'slider' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@backend/messages', ], ], ], ], 'params' => $params, ];