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.

61 lines
1.9 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. 'antgoods' => [
  12. 'class' => 'antgoods\goods\Module',
  13. ],
  14. ],
  15. 'components' => [
  16. 'request' => [
  17. 'csrfParam' => '_csrf-backend',
  18. ],
  19. 'user' => [
  20. 'identityClass' => 'common\models\User',
  21. 'enableAutoLogin' => true,
  22. 'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
  23. ],
  24. 'session' => [
  25. // this is the name of the session cookie used for login on the app
  26. 'name' => 'backend',
  27. ],
  28. 'log' => [
  29. 'traceLevel' => YII_DEBUG ? 3 : 0,
  30. 'targets' => [
  31. [
  32. 'class' => 'yii\log\FileTarget',
  33. 'levels' => ['error', 'warning'],
  34. ],
  35. [
  36. 'class' => 'yii\log\FileTarget',
  37. 'levels' => ['info', 'error'],
  38. 'categories' => ['imagetest'],
  39. 'logFile' => '@app/runtime/logs/imagetest.log',
  40. 'logVars' => [],
  41. 'exportInterval' => 1,
  42. 'prefix' => function ($message) {
  43. }
  44. ],
  45. ],
  46. ],
  47. 'errorHandler' => [
  48. 'errorAction' => 'site/error',
  49. ],
  50. 'urlManager' => [
  51. 'enablePrettyUrl' => true,
  52. 'showScriptName' => false,
  53. 'rules' => [
  54. ],
  55. ],
  56. 'file' => ['class' => 'backend\logic\file\FileManager'],
  57. ],
  58. 'params' => $params,
  59. ];