Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

56 lines
1.6KB

  1. <?php
  2. $params = array_merge(
  3. require(__DIR__ . '/../../common/config/params.php'),
  4. require(__DIR__ . '/../../common/config/params-local.php'),
  5. require(__DIR__ . '/params.php'),
  6. require(__DIR__ . '/params-local.php')
  7. );
  8. return [
  9. 'id' => 'app-producer',
  10. 'basePath' => dirname(__DIR__),
  11. 'bootstrap' => ['log'],
  12. 'controllerNamespace' => 'producer\controllers',
  13. 'components' => [
  14. 'user' => [
  15. 'identityClass' => 'common\models\User',
  16. 'enableAutoLogin' => true,
  17. ],
  18. 'log' => [
  19. 'traceLevel' => YII_DEBUG ? 3 : 0,
  20. 'targets' => [
  21. [
  22. 'class' => 'yii\log\FileTarget',
  23. 'levels' => ['error', 'warning'],
  24. ],
  25. ],
  26. ],
  27. 'errorHandler' => [
  28. 'errorAction' => 'producer/error',
  29. ],
  30. 'assetManager' => [
  31. 'bundles' => [
  32. 'yii\web\JqueryAsset' => [
  33. 'sourcePath' => null, // do not publish the bundle
  34. 'js' => [
  35. 'https://code.jquery.com/jquery-1.11.2.min.js'
  36. ]
  37. ],
  38. ],
  39. ],
  40. 'view' => [
  41. 'class' => 'producer\components\ProducerView',
  42. ],
  43. 'urlManager' => [
  44. 'class' => 'producer\components\ProducerUrlManager',
  45. 'enablePrettyUrl' => true,
  46. 'showScriptName' => false,
  47. 'enableStrictParsing' => false,
  48. 'rules' => [
  49. '<slug_producer:\w+>/<controller>/<action>' => '<controller>/<action>',
  50. ],
  51. ],
  52. ],
  53. 'params' => $params,
  54. ];