You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
124 lines
3.3 KiB
124 lines
3.3 KiB
<?php |
|
$params = array_merge( |
|
require __DIR__ . '/../../common/config/params.php', |
|
require __DIR__ . '/../../common/config/params-local.php', |
|
require __DIR__ . '/params.php', |
|
require __DIR__ . '/params-local.php' |
|
); |
|
|
|
return [ |
|
'id' => 'app-backend', |
|
'language' => 'ru', |
|
'basePath' => dirname(__DIR__), |
|
'aliases' => [ |
|
'@staticRoot' => $params['staticPath'], |
|
'@static' => $params['staticHostInfo'], |
|
], |
|
'controllerNamespace' => 'backend\controllers', |
|
'bootstrap' => [ |
|
'log', |
|
'common\bootstrap\SetUp', |
|
'backend\bootstrap\SetUp', |
|
], |
|
'modules' => [], |
|
'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' |
|
], |
|
], |
|
], |
|
], |
|
'components' => [ |
|
'request' => [ |
|
'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', |
|
], |
|
'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, |
|
];
|
|
|