components.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: slava
  5. * Date: 13.05.17
  6. * Time: 17:01
  7. */
  8. return [
  9. 'request' => [
  10. // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  11. 'cookieValidationKey' => 'cqnasKuLkltNc9Ma2pGZduPzYBfVFOei',
  12. ],
  13. 'cache' => [
  14. 'class' => 'yii\caching\FileCache',
  15. ],
  16. 'user' => [
  17. 'identityClass' => 'app\models\dektriumuser\User',
  18. 'enableAutoLogin' => true,
  19. ],
  20. 'errorHandler' => [
  21. 'errorAction' => 'site/error',
  22. ],
  23. 'mailer' => require(__DIR__ . '/../mailer.php'),
  24. 'log' => [
  25. 'traceLevel' => YII_DEBUG ? 3 : 0,
  26. 'targets' => [
  27. [
  28. 'class' => 'yii\log\FileTarget',
  29. 'levels' => ['error', 'warning'],
  30. ],
  31. ],
  32. ],
  33. 'db' => require(__DIR__ . '/../db.php'),
  34. 'urlManager' => [
  35. 'enablePrettyUrl' => true,
  36. 'showScriptName' => false,
  37. 'rules' => [
  38. '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
  39. ],
  40. ],
  41. 'view' => [
  42. 'theme' => [
  43. 'pathMap' => [
  44. '@dektrium/user/views' => '@app/views/dektriumuser',
  45. '@dektrium/user/views/mail' => '@app/views/dektriumuser/mail',
  46. ],
  47. ],
  48. ],
  49. ];