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.

71 lines
2.2 KiB

  1. <?php
  2. $params = array_merge(
  3. require __DIR__ . '/../../common/config/params.php', require __DIR__ . '/../../common/config/params-local.php', require __DIR__ . '/params.php', require __DIR__ . '/params-local.php'
  4. );
  5. return [
  6. 'id' => 'backend',
  7. 'basePath' => dirname(__DIR__),
  8. 'controllerNamespace' => 'backend\controllers',
  9. 'bootstrap' => ['log'],
  10. 'modules' => [
  11. 'goods' => [
  12. 'class' => '\backend\modules\goods\Module',
  13. ],
  14. 'file' => [
  15. 'class' => '\backend\modules\file\Module',
  16. ],
  17. 'shop' => [
  18. 'class' => '\backend\modules\shop\Module',
  19. ],
  20. ],
  21. 'components' => [
  22. 'request' => [
  23. 'parsers' => [
  24. 'application/json' => 'yii\web\JsonParser',
  25. ],
  26. 'csrfParam' => '_csrf-api',
  27. ],
  28. 'user' => [
  29. 'identityClass' => 'common\models\User',
  30. 'enableAutoLogin' => true,
  31. 'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
  32. ],
  33. 'session' => [
  34. // this is the name of the session cookie used for login on the app
  35. 'name' => 'backend',
  36. ],
  37. 'log' => [
  38. 'traceLevel' => YII_DEBUG ? 3 : 0,
  39. 'targets' => [
  40. [
  41. 'class' => 'yii\log\FileTarget',
  42. 'levels' => ['error', 'warning'],
  43. ],
  44. [
  45. 'class' => 'yii\log\FileTarget',
  46. 'levels' => ['info', 'error'],
  47. 'categories' => ['imagetest'],
  48. 'logFile' => '@app/runtime/logs/imagetest.log',
  49. 'logVars' => [],
  50. 'exportInterval' => 1,
  51. 'prefix' => function ($message) {
  52. }
  53. ],
  54. ],
  55. ],
  56. 'errorHandler' => [
  57. 'errorAction' => 'site/error',
  58. ],
  59. 'urlManager' => [
  60. 'enablePrettyUrl' => true,
  61. 'showScriptName' => false,
  62. 'rules' => [
  63. ],
  64. ],
  65. 'file' => ['class' => 'backend\logic\file\FileManager'],
  66. 'goods' => ['class' => 'goods\goods\logic\goods\GoodsManager'],
  67. ],
  68. 'params' => $params,
  69. ];