Blame view

frontend/config/main.php 4 KB
4253cbec   root   first commit
1
2
3
4
5
6
7
8
9
10
  <?php

  $params = array_merge(

      require(__DIR__ . '/../../common/config/params.php'),

      require(__DIR__ . '/../../common/config/params-local.php'),

      require(__DIR__ . '/params.php'),

      require(__DIR__ . '/params-local.php')

  );

  

  return [

      'id' => 'app-frontend',

5181a91a   Administrator   big commti
11
      'name'=>'Лінія Світла',

4253cbec   root   first commit
12
13
14
15
16
17
18
      'basePath' => dirname(__DIR__),

      'bootstrap' => [

  

          'frontend\components\SeoComponent',

      ],

      'controllerNamespace' => 'frontend\controllers',

      'modules' => [

e337d04a   Administrator   liniya first commit
19
  

4253cbec   root   first commit
20
21
      ],

      'components' => [

6c66c02e   Administrator   big commti
22
23
24
25
26
27
28
          'assetManager' => [

              'bundles' => [

                  'yii\web\JqueryAsset' =>[

                      'jsOptions' =>  ['position' => \yii\web\View::POS_END]

                  ]

              ],

          ],

4253cbec   root   first commit
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
          'authManager' => [

              'class' => 'yii\rbac\DbManager',

          ],

          'user' => [

              'identityClass'   => 'common\models\Customer',

              'enableAutoLogin' => true,

              'loginUrl'        => ['login'],

          ],

          'request'=>[

              'cookieValidationKey' => 'ndahjhjjidasuidrqeswuiuirqw89',

              'csrfParam' => '_frontendCSRF',

              'class' => 'common\components\Request',

  

              'web'=> '/frontend/web'

  

          ],

  

          'log' => [

              'traceLevel' => YII_DEBUG ? 3 : 0,

              'targets' => [

                  [

                      'class' => 'yii\log\FileTarget',

                      'levels' => ['error', 'warning'],

                  ],

              ],

          ],

          'errorHandler' => [

              'errorAction' => 'site/error',

          ],

e337d04a   Administrator   liniya first commit
58
  

4253cbec   root   first commit
59
60
61
62
          'urlManager'   => [

              'enablePrettyUrl' => true,

              'showScriptName'  => false,

              'rules'           => [

076b9c96   Administrator   big commti
63
64
65
66
67
                  ''                                                                 => 'site/main',

                  'login'                                                            => 'login/main',

                  'iam'                                                              => 'iam/main',

                  'text/<translit:[\w\_\-]+>'                                        => 'text/main',

                  '<language:(ru|ua|en)>/text/<translit:\w+>'                        => 'text/main',

4253cbec   root   first commit
68
69
70
71
72
                  [

                      'class' => '\common\modules\product\CatalogUrlManager',

                      'route_map' => [

                          'catalog' => 'catalog/category',

                          'product' => 'catalog/product',

bc07fb47   Administrator   big commti
73
74
                          '<product:^(.+)\.htm$>' => 'catalog/product',

  

4253cbec   root   first commit
75
76
77
  

                      ]

                  ],

dc9ffa3c   Administrator   big commti
78
  

076b9c96   Administrator   big commti
79
                  'cabinet/main'                                                             => '/cabinet/main',

4253cbec   root   first commit
80
81
82
                  'priceparam.xml'    => 'site/priceparam',

                  'price.xml'         => 'site/price',

                  'smstest'           => 'site/sms',

076b9c96   Administrator   big commti
83
                  'search/main'            => 'search/main',

950470c1   Administrator   big commti
84
                  'news/<translit:\w+>'                                     => 'news/show',

076b9c96   Administrator   big commti
85
                  'brands/main'                                                           => 'catalog/brands',

4253cbec   root   first commit
86
                  'brands/<brand:[\w\-]+>'                                           => 'catalog/brand',

076b9c96   Administrator   big commti
87
88
89
                  'articles/main'                                                             => 'articles/main',

                  'articles/<translit:[\w\-\_]+>'                                 => 'articles/show',

                  'event/main'                                                            => 'event/main',

66285eca   Administrator   big commti
90
                  'event/sale/<percent:[\d\-]+>'                                   => 'event/sale',

37415bee   Administrator   big commti
91
                  'event/<alias:[\w\-]+>'                                   => 'event/show',

4253cbec   root   first commit
92
              ],

e337d04a   Administrator   liniya first commit
93
94
95
96
              'class'           => 'common\components\urlManager\LangUrlManager',

              'languages'       => ['ru', 'ua', 'en'],

              'lang'            => 'ru',

              'langParam'       => 'language',

4253cbec   root   first commit
97
98
99
100
101
          ],

  

      ],

      'params' => $params,

  ];