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.

66 lines
2.4KB

  1. <?php
  2. return [
  3. 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
  4. 'components' => [
  5. 'user' => [
  6. 'class' => 'yii\web\User',
  7. 'identityClass' => 'common\models\User',
  8. 'enableAutoLogin' => true,
  9. 'identityCookie' => [
  10. 'name' => 'laboiteapain',
  11. 'domain' => '.'.Yii::getAlias('@domainName'),
  12. 'path' => '/',
  13. ]
  14. ],
  15. 'session' => [
  16. 'class' => 'yii\web\Session',
  17. 'cookieParams' => [
  18. 'domain' => '.'.Yii::getAlias('@domainName'),
  19. 'httpOnly' => true,
  20. ],
  21. ],
  22. 'cache' => [
  23. 'class' => 'yii\caching\FileCache',
  24. ],
  25. 'image' => [
  26. 'class' => 'yii\image\ImageDriver',
  27. 'driver' => 'GD', //GD or Imagick
  28. ],
  29. 'urlManagerProducer' => [
  30. 'class' => 'producer\components\UrlManagerProducer',
  31. 'subDomain' => Yii::getAlias('@producerSubdomain'),
  32. 'domainName' => Yii::getAlias('@domainName'),
  33. 'baseUrl' => Yii::getAlias('@baseUrl').Yii::getAlias('@baseUrlProducer'),
  34. 'enablePrettyUrl' => true,
  35. 'showScriptName' => false,
  36. 'enableStrictParsing' => false,
  37. 'rules' => [
  38. '<slug_producer:\w+>/<controller>/<action>' => '<controller>/<action>',
  39. ],
  40. ],
  41. 'urlManagerFrontend' => [
  42. 'class' => 'common\components\UrlManagerCommon',
  43. 'subDomain' => Yii::getAlias('@frontendSubdomain'),
  44. 'domainName' => Yii::getAlias('@domainName'),
  45. 'baseUrl' => Yii::getAlias('@baseUrl').Yii::getAlias('@baseUrlFrontend'),
  46. 'enablePrettyUrl' => true,
  47. 'showScriptName' => false,
  48. 'enableStrictParsing' => false,
  49. 'rules' => [
  50. ],
  51. ],
  52. 'urlManagerBackend' => [
  53. 'class' => 'common\components\UrlManagerCommon',
  54. 'subDomain' => Yii::getAlias('@backendSubdomain'),
  55. 'domainName' => Yii::getAlias('@domainName'),
  56. 'baseUrl' => Yii::getAlias('@baseUrl').Yii::getAlias('@baseUrlBackend'),
  57. 'enablePrettyUrl' => true,
  58. 'showScriptName' => false,
  59. 'enableStrictParsing' => false,
  60. 'rules' => [
  61. ],
  62. ],
  63. ],
  64. 'language' => 'fr-FR',
  65. ];