Blame view

frontend/config/main.php 7.51 KB
3f2bc3d0   Administrator   first commit
1
2
3
4
5
6
7
8
9
10
11
  <?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',

      'basePath' => dirname(__DIR__),

e2f1664a   Administrator   rm node nodule
12
13
14
15
  //    'bootstrap' => [

  //

  //        'frontend\components\SeoComponent',

  //    ],

3f2bc3d0   Administrator   first commit
16
      'controllerNamespace' => 'frontend\controllers',

85040b57   Yarik   Comment added
17
      'modules' => [

4ec7f039   Alex Savenko   remove artbox com...
18
19
20
          'artbox-comment' => [

              'class' => 'common\modules\comment\Module',

          ],

c05bf005   Yarik   Comment added
21
22
23
24
25
26
27
28
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
58
59
60
61
  //        'comment' => [

  //            'class' => 'common\modules\comment\Module',

  //            'useRbac' => false,

  //            'rbac' => [

  //                'rules' => [

  //                    \common\modules\comment\rbac\ArtboxCommentCreateRule::className(),

  //                    \common\modules\comment\rbac\ArtboxCommentDeleteRule::className(),

  //                    \common\modules\comment\rbac\ArtboxCommentUpdateRule::className(),

  //                    \common\modules\comment\rbac\ArtboxCommentUpdateOwnRule::className(),

  //                    \common\modules\comment\rbac\ArtboxCommentDeleteOwnRule::className(),

  //                ],

  //                'permissions' => [

  //                    [

  //                        'name' => common\modules\comment\Permissions::CREATE,

  //                        'description' => 'Can create comments',

  //                        'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentCreateRule())->name,

  //                    ],

  //                    [

  //                        'name' => common\modules\comment\Permissions::UPDATE,

  //                        'description' => 'Can update comments',

  //                        'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentUpdateRule())->name,

  //                    ],

  //                    [

  //                        'name' => common\modules\comment\Permissions::DELETE,

  //                        'description' => 'Can delete comments',

  //                        'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentDeleteRule())->name,

  //                    ],

  //                    [

  //                        'name' => common\modules\comment\Permissions::UPDATE_OWN,

  //                        'description' => 'Can update own comments',

  //                        'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentUpdateOwnRule())->name,

  //                    ],

  //                    [

  //                        'name' => common\modules\comment\Permissions::DELETE_OWN,

  //                        'description' => 'Can delete own comments',

  //                        'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentDeleteOwnRule())->name,

  //                    ],

  //                ],

  //            ],

  //

  //        ],

85040b57   Yarik   Comment added
62
      ],

3f2bc3d0   Administrator   first commit
63
      'components' => [

ac8ab861   Administrator   20.07.16
64
  

9eaaca9d   Administrator   image size
65
66
67
          'authManager' => [

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

          ],

3f2bc3d0   Administrator   first commit
68
          'user' => [

7ba4acc5   Administrator   after marge
69
              'identityClass'   => 'common\models\Customer',

3f2bc3d0   Administrator   first commit
70
              'enableAutoLogin' => true,

7ba4acc5   Administrator   after marge
71
              'loginUrl'        => ['login'],

3f2bc3d0   Administrator   first commit
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
          ],

          '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',

          ],

dc2cd017   Karnovsky A   -
94
          /*'imageCache' => [

ccc7a9d3   Karnovsky A   Karnovsky 12052016
95
96
97
              'class' => 'iutbay\yii2imagecache\ImageCache',

              'sourcePath' => '@app/web/images',

              'sourceUrl' => '@web/images',

2f93d129   Karnovsky A   -
98
99
100
              'thumbsPath' => '@app/web/thumbs',

              'thumbsUrl' => '@web/thumbs',

              'resizeMode' => 'inset',

ccc7a9d3   Karnovsky A   Karnovsky 12052016
101
102
103
104
105
              'sizes' => [

                  'brandlist' => [128, 128],

                  'product' => [300, 300],

                  'product_trumb' => [80, 80],

                  'product_trumb2' => [100, 100],

2f93d129   Karnovsky A   -
106
                  'list' => [134, 200],

ccc7a9d3   Karnovsky A   Karnovsky 12052016
107
                  'product_list2' => [130, 70],

2f93d129   Karnovsky A   -
108
                  'product_variant' => [42, 42],

ccc7a9d3   Karnovsky A   Karnovsky 12052016
109
110
111
                  'mainmenu' => [160, 170],

                  'large' => [600, 600],

              ],

dc2cd017   Karnovsky A   -
112
          ],*/

7ba4acc5   Administrator   after marge
113
          'urlManager'   => [

132aac99   Alex Savenko   canonical update3...
114
              'baseUrl' => 'http://www.rukzachok.com.ua',

3f2bc3d0   Administrator   first commit
115
              'enablePrettyUrl' => true,

7ba4acc5   Administrator   after marge
116
117
118
119
120
              'showScriptName'  => false,

              'rules'           => [

                  ''                                                                 => 'site/index',

                  'login'                                                            => 'login/index',

                  'iam'                                                              => 'iam/index',

cac3c9f7   Administrator   20.07.16
121
                  'text/<translit:[\w\_\-]+>'                                              => 'text/index',

7ba4acc5   Administrator   after marge
122
                  '<language:(ru|ua|en)>/text/<translit:\w+>'                        => 'text/index',

ccc7a9d3   Karnovsky A   Karnovsky 12052016
123
124
125
126
127
                  [

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

                      'route_map' => [

                          'catalog' => 'catalog/category',

                          'product' => 'catalog/product',

ac8ab861   Administrator   20.07.16
128
  

ccc7a9d3   Karnovsky A   Karnovsky 12052016
129
130
                      ]

                  ],

02e6c2ba   Karnovsky A   -
131
132
                  'priceparam.xml'    => 'site/priceparam',

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

2223e58b   Dmytry Fedorchuk   smstest router an...
133
                  'smstest'           => 'site/sms',

0f852b51   Administrator   29.06.16
134
                  'search' => 'search/index',

ccc7a9d3   Karnovsky A   Karnovsky 12052016
135
136
137
138
139
140
  //                'catalog'                                                          => 'catalog/all',

  //                'catalog/<translit:\w+>'                                           => 'catalog/index',

  //                'products/search'                                                  => 'products/search',

  //                'products/compare'                                                 => 'products/compare',

  //                'products/<translit:\w+>'                                          => 'products/index',

  //                'products/<translit_rubric:\w+>/<translit:[\w\-]+>-<id:\d+>'       => 'products/show',

7ba4acc5   Administrator   after marge
141
                  'news/<translit:\w+>-<id:\d+>'                                     => 'news/show',

ac8ab861   Administrator   20.07.16
142
                  'brands'                                                           => 'catalog/brands',

26f2d2d0   Administrator   20.07.16
143
                  'brands/<brand:[\w\-]+>'                                           => 'catalog/brand',

7ba4acc5   Administrator   after marge
144
                  'blog'                                                             => 'articles/index',

cf77cbae   Administrator   14.09.16
145
                  'blog/<translit:[\w\-\_]+>'                                 => 'articles/show',

84b2aead   Administrator   add active menu
146
                  'event'                                                             => 'event/index',

cf77cbae   Administrator   14.09.16
147
                  'event/<alias:[\w\-]+>'                                   => 'event/show',

7ba4acc5   Administrator   after marge
148
149
150
151
                  '<language:(ru|ua|en)>/<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',

                  '<language:(ru|ua|en)>/<controller:\w+>/<action:\w+>'              => '<controller>/<action>',

                  '<language:(ru|ua|en)>/admin'                                      => 'admin/default/index',

                  '<language:(ru|ua|en)>/admin/users'                                => 'admin/users/index',

2f93d129   Karnovsky A   -
152
                  'thumbs/<path:.*>' => 'site/thumb',

7ba4acc5   Administrator   after marge
153
              ],

07f74fa8   Administrator   20.07.16
154
  

7ba4acc5   Administrator   after marge
155
          ],

3f2bc3d0   Administrator   first commit
156
157
158
159
  

      ],

      'params' => $params,

  ];