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.

main.php 1.3KB

8 years ago
8 years ago
8 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. $common_config_main = array_merge(require(__DIR__ . '/../../common/config/main.php'));
  9. return [
  10. 'id' => 'app-frontend',
  11. 'basePath' => dirname(__DIR__),
  12. 'bootstrap' => ['log'],
  13. 'controllerNamespace' => 'frontend\controllers',
  14. 'components' => [
  15. 'log' => [
  16. 'traceLevel' => YII_DEBUG ? 3 : 0,
  17. 'targets' => [
  18. [
  19. 'class' => 'yii\log\FileTarget',
  20. 'levels' => ['error', 'warning'],
  21. ],
  22. ],
  23. ],
  24. 'errorHandler' => [
  25. 'errorAction' => 'site/error',
  26. ],
  27. 'assetManager' => [
  28. 'bundles' => [
  29. 'yii\web\JqueryAsset' => [
  30. 'sourcePath' => null, // do not publish the bundle
  31. 'js' => [
  32. 'https://code.jquery.com/jquery-1.11.2.min.js'
  33. ]
  34. ],
  35. ],
  36. ],
  37. 'view' => [
  38. 'class' => 'common\components\MyView',
  39. ],
  40. 'urlManager' => $common_config_main['components']['urlManagerFrontend'],
  41. ],
  42. 'params' => $params,
  43. ];