- <?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-producer',
- 'basePath' => dirname(__DIR__),
- 'bootstrap' => ['log'],
- 'controllerNamespace' => 'producer\controllers',
- 'components' => [
- 'user' => [
- 'identityClass' => 'common\models\User',
- 'enableAutoLogin' => true,
- ],
- 'log' => [
- 'traceLevel' => YII_DEBUG ? 3 : 0,
- 'targets' => [
- [
- 'class' => 'yii\log\FileTarget',
- 'levels' => ['error', 'warning'],
- ],
- ],
- ],
- 'errorHandler' => [
- 'errorAction' => 'producer/error',
- ],
- 'assetManager' => [
- 'bundles' => [
- 'yii\web\JqueryAsset' => [
- 'sourcePath' => null, // do not publish the bundle
- 'js' => [
- 'https://code.jquery.com/jquery-1.11.2.min.js'
- ]
- ],
- ],
- ],
- 'view' => [
- 'class' => 'producer\components\ProducerView',
- ],
- 'urlManager' => [
- 'class' => 'producer\components\ProducerUrlManager',
- 'enablePrettyUrl' => true,
- 'showScriptName' => false,
- 'enableStrictParsing' => false,
- 'rules' => [
- '<slug_producer:\w+>/<controller>/<action>' => '<controller>/<action>',
- ],
- ],
- ],
- 'params' => $params,
- ];
|