Blame view

common/config/main.php 16.4 KB
3f2bc3d0   Administrator   first commit
1
2
  <?php

  return [

71bb42d5   Administrator   second
3
      'language'      => 'ru',

3f2bc3d0   Administrator   first commit
4
      'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',

e608c5f7   Yarik   Comment added
5
6
7
8
9
      'controllerMap' => [

          'artbox-comment' => [

              'class' => \common\modules\comment\Controller::className(),

          ],

      ],

3f2bc3d0   Administrator   first commit
10
11
12
13
14
15
16
      'components' => [

          'assetManager' => [

              'bundles' => [

                  'yii\web\JqueryAsset' =>[

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

                  ]

              ],

3f2bc3d0   Administrator   first commit
17
          ],

9eaaca9d   Administrator   image size
18
  

40366ecb   Dmytry Fedorchuk   All seo
19
20
21
22
          'sms' => [

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

          ],

  

3f2bc3d0   Administrator   first commit
23
24
25
          'cache' => [

              'class' => 'yii\caching\FileCache',

          ],

71bb42d5   Administrator   second
26
  

3f2bc3d0   Administrator   first commit
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
          'i18n' => [

              'translations' => [

                  '*' => [

                      'class' => 'yii\i18n\PhpMessageSource',

                      'basePath' => '@common/translation',

                      'fileMap' => [

                          'app' => 'app.php',

                          'app/error' => 'error.php',

                      ],

                  ],

                  'app' => [

                      'class' => 'yii\i18n\PhpMessageSource',

                      'basePath' => '@common/translation',

                      'fileMap' => [

                          'app' => 'app.php',

                          'app/error' => 'error.php',

                      ],

                  ],

              ],

          ],

2f93d129   Karnovsky A   -
47
48
49
          'artboximage' => [

              'class' => 'common\components\artboximage\ArtboxImage',

              'driver' => 'GD',  //GD or Imagick

30ea8a35   Administrator   29.06.16
50
51
              'rootPath' => Yii::getAlias('@storage'),

              'rootUrl' => Yii::getAlias('/storage'),

2f93d129   Karnovsky A   -
52
53
54
55
56
57
58
              'presets' => [

                  'product' => [

                      'resize' => [

                          'width' => 300,

                          'height' => 300,

                          'master' => null

                      ],

2f93d129   Karnovsky A   -
59
                  ],

dc2cd017   Karnovsky A   -
60
                  'product_variant' => [

2f93d129   Karnovsky A   -
61
                      'resize' => [

2e726956   Administrator   image size
62
63
                          'width' => 38,

                          'height' => 38,

2f93d129   Karnovsky A   -
64
65
66
                          'master' => null

                      ],

                  ],

dc2cd017   Karnovsky A   -
67
                  'product_trumb2' => [

2f93d129   Karnovsky A   -
68
                      'resize' => [

e1e4df06   Administrator   image size
69
70
                          'width' => 88,

                          'height' => 88,

2f93d129   Karnovsky A   -
71
72
73
                          'master' => null

                      ],

                  ],

38828295   Karnovsky A   -
74
75
76
77
78
79
80
                  'product_basket' => [

                      'resize' => [

                          'width' => 100,

                          'height' => 200,

                          'master' => null

                      ],

                  ],

577a3b1a   Administrator   image size
81
82
83
                  'product_view' => [

                      'resize' => [

                          'width' => 392,

ecb5651a   Administrator   image size
84
                          'height' => 365,

577a3b1a   Administrator   image size
85
86
87
                          'master' => null

                      ],

                  ],

38828295   Karnovsky A   -
88
89
90
91
92
93
94
                  'iam' => [

                      'resize' => [

                          'width' => 120,

                          'height' => 240,

                          'master' => null

                      ],

                  ],

dc2cd017   Karnovsky A   -
95
                  'slider' => [

cbcf466f   Karnovsky A   -
96
                      'resize' => [

dc2cd017   Karnovsky A   -
97
98
                          'width' => 720,

                          'height' => 340,

cbcf466f   Karnovsky A   -
99
100
101
                          'master' => null

                      ],

                  ],

dc2cd017   Karnovsky A   -
102
                  'brandlist' => [

2f93d129   Karnovsky A   -
103
                      'resize' => [

dc2cd017   Karnovsky A   -
104
105
                          'width' => 128,

                          'height' => 128,

2f93d129   Karnovsky A   -
106
107
108
                          'master' => null

                      ],

                  ],

e75a92ca   Administrator   image size
109
110
111
112
113
114
115
                  'eventlist' => [

                      'resize' => [

                          'width' => 180,

                          'height' => 125,

                          'master' => null

                      ],

                  ],

38828295   Karnovsky A   -
116
117
118
119
120
121
122
123
124
125
126
127
                  'brand_item' => [

                      'resize' => [

                          'width' => 150,

                          'height' => 150,

                          'master' => null

                      ],

                      'crop' => [

                          'width' => 150,

                          'height' => 150,

                          'master' => null

                      ],

                  ],

dc2cd017   Karnovsky A   -
128
                  'mainmenu' => [

2f93d129   Karnovsky A   -
129
                      'resize' => [

dc2cd017   Karnovsky A   -
130
131
                          'width' => 160,

                          'height' => 170,

2f93d129   Karnovsky A   -
132
133
134
                          'master' => null

                      ],

                  ],

dc2cd017   Karnovsky A   -
135
                  'list' => [

2f93d129   Karnovsky A   -
136
                      'resize' => [

065e6a52   Administrator   image size
137
                          'width' => 134,

dc2cd017   Karnovsky A   -
138
                          'height' => 200,

2f93d129   Karnovsky A   -
139
140
141
142
143
144
145
146
147
148
                          'master' => null

                      ],

                  ],

                  'large' => [

                      'resize' => [

                          'width' => 600,

                          'height' => 600,

                          'master' => null

                      ],

                  ],

83be3cfb   Karnovsky A   -
149
150
151
152
153
                  'admin_thumb' => [

                      'resize' => [

                          'width' => 256,

                      ],

                  ],

2f93d129   Karnovsky A   -
154
155
              ]

          ],

3f2bc3d0   Administrator   first commit
156
157
158
      ],

  

      'modules' => [

d8d0c38c   Administrator   add active menu
159
160
          'file' => [

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

3f2bc3d0   Administrator   first commit
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
          ],

          'relation' => [

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

              'relations' => [

                  'product_categories' => [

                      'name' => Yii::t('product', 'Categories'),

                      'field' => 'categories',

                      'entity1' => [

                          'model' => '\common\modules\product\models\Product',

                          'label' => 'Product',

                          'listField' => 'name',

                          'searchField' => 'name',

                          'key' => 'product_id',

                          'linked_key' => 'product_id',

                      ],

                      'entity2' => [

                          'model' => '\common\modules\product\models\Category',

                          'label' => 'Category',

                          'listField' => 'categoryName.value',

                          'searchField' => 'category_name.value',

                          'searchJoin' => 'categoryName',

                          'key' => 'category_id',

                          'linked_key' => 'category_id',

                          'hierarchy' => [

                              'key' => 'category_id',

                              'parentKey' => 'parent_id',

                          ]

                      ],

                      'via' => [

                          'model' => '\common\modules\product\models\ProductCategory',

                      ]

                  ],

                  'product_option' => [

                      'name' => Yii::t('product', 'Properties'),

                      'field' => 'options',

                      'entity1' => [

                          'model' => '\common\modules\product\models\Product',

                          'label' => 'Product',

                          'listField' => 'fullname',

                          'key' => 'product_id',

                          'linked_key' => 'product_id',

                      ],

                      'entity2' => [

                          'model' => '\common\modules\rubrication\models\TaxOption',

                          'label' => 'Option',

                          'listField' => 'ValueRenderFlash',

                          'key' => 'tax_option_id',

                          'linked_key' => 'option_id',

                      ],

                      'via' => [

                          'model' => 'common\modules\product\models\ProductOption',

                      ]

                  ],

a0be9a4d   Karnovsky A   30062016
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
                  'product_variant_option' => [

                      'name' => Yii::t('product', 'Properties'),

                      'field' => 'options',

                      'entity1' => [

                          'model' => '\common\modules\product\models\ProductVariant',

                          'label' => 'Variant',

                          'listField' => 'fullname',

                          'key' => 'product_variant_id',

                          'linked_key' => 'product_variant_id',

                      ],

                      'entity2' => [

                          'model' => '\common\modules\rubrication\models\TaxOption',

                          'label' => 'Option',

                          'listField' => 'ValueRenderFlash',

                          'key' => 'tax_option_id',

                          'linked_key' => 'option_id',

                      ],

                      'via' => [

                          'model' => 'common\modules\product\models\ProductVariantOption',

                      ]

                  ],

3f2bc3d0   Administrator   first commit
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
                  'tax_group_to_category' => [

                      'name' => Yii::t('product', 'Характеристики по категориям'),

                      'field' => 'group_to_category',

                      'entity1' => [

                          'model' => '\common\modules\rubrication\models\TaxGroup',

                          'label' => 'Group',

                          'listField' => 'name',

                          'key' => 'tax_group_id',

                          'linked_key' => 'entity1_id',

                      ],

                      'entity2' => [

                          'model' => '\common\modules\product\models\Category',

                          'label' => 'Category',

                          'listField' => 'name',

                          'key' => 'category_id',

                          'linked_key' => 'entity2_id',

                          'hierarchy' => [

                              'key' => 'category_id',

                              'parentKey' => 'parent_id',

                          ]

                      ],

                      'via' => [

                          'model' => '\common\modules\relation\models\Relation',

                          'alias' => 'alias',

                      ]

                  ],

                  /*

                  'relation_categories' => [

                      'name' => Yii::t('relation', 'Relation categories'),

                      'field' => 'categories',

                      'entity1' => [

                          'model' => '\common\modules\product\models\Product',

                          'label' => 'Product',

                          'listField' => 'fullname',

                          'key' => 'product_id',

                          'linked_key' => 'product_id',

                      ],

                      'entity2' => [

                          'model' => '\common\modules\rubrication\models\TaxOption',

                          'label' => 'Category',

                          'listField' => 'ValueRenderFlash',

                          'key' => 'tax_option_id',

                          'linked_key' => 'category_id',

                          'where' => [

                              'tax_group_id' => 1

                          ]

                      ],

                      'via' => [

                          'model' => '\common\modules\relation\models\Relation',

                          'alias' => 'alias',

                      ]

                  ],

                  'tax_option_to_group' => [

                      'name' => 'Options-Groups',

                      'field' => 'tax_option_to_group',

                      'linked_table' => 'tax_option_to_group',

                      'entity1' => [

                          'label' => 'Option',

                          'listField' => 'ValueRenderFlash',

                          'model' => '\common\modules\rubrication\models\TaxOption',

                          'key' => 'tax_option_id',

                          'linked_key' => 'tax_option_id',

                      ],

                      'entity2' => [

                          'label' => 'Group',

                          'listField' => 'name',

                          'model' => '\common\modules\rubrication\models\TaxGroup',

                          'key' => 'tax_group_id',

                          'linked_key' => 'tax_group_id',

                      ],

                      'via' => [

                          'model' => 'common\modules\rubrication\models\TaxOptionToGroup',

                          'alias' => 'alias',

                      ]

                  ],

                  'tax_option_to_option' => [

                      'name' => 'Options-Options',

                      'field' => 'tax_option_to_option',

                      'entity1' => [

                          'label' => 'Option',

                          'listField' => 'ValueRenderFlash',

                          'model' => '\common\modules\rubrication\models\TaxOption',

                          'key' => 'tax_option_id',

                          'linked_key' => 'tax_option1_id',

                      ],

                      'entity2' => [

                          'label' => 'Option',

                          'listField' => 'ValueRenderFlash',

                          'model' => '\common\modules\rubrication\models\TaxOption',

                          'key' => 'tax_option_id',

                          'linked_key' => 'tax_option2_id',

                      ],

                      'via' => [

                          'model' => 'common\modules\rubrication\models\TaxOptionRelation',

                          'alias' => 'alias',

                      ]

                  ],

                  'brand_cats' => [

                      'name' => 'Категории производителей',

                      'field' => 'tax_option_to_option',

                      'entity1' => [

                          'label' => 'Бренд',

                          'listField' => 'ValueRenderFlash',

                          'model' => '\common\modules\rubrication\models\TaxOption',

                          'key' => 'tax_option_id',

                          'linked_key' => 'tax_option1_id',

                      ],

                      'entity2' => [

                          'label' => 'Категория',

                          'listField' => 'ValueRenderFlash',

                          'model' => '\common\modules\rubrication\models\TaxOption',

                          'key' => 'tax_option_id',

                          'linked_key' => 'tax_option2_id',

                      ],

                      'via' => [

                          'model' => 'common\modules\rubrication\models\TaxOptionRelation',

                          'alias' => 'alias',

                      ]

                  ]*/

              ]

          ],

e608c5f7   Yarik   Comment added
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
          '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,

                      ],

                  ],

              ],

  

          ],

3f2bc3d0   Administrator   first commit
397
398
      ],

  ];