a8370482
Alexander Karnovsky
init project
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php
return [
'language' => 'ru-RU',
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'controllerMap' => [
'elfinder' => [
'class' => 'mihaildev\elfinder\Controller',
'access' => ['@'], //глобальный доступ к фаил менеджеру @ - для авторизорованных , ? - для гостей , чтоб открыть всем ['@', '?']
'disabledCommands' => ['netmount'], //отключение ненужных команд https://github.com/Studio-42/elFinder/wiki/Client-configuration-options#commands
'roots' => [
[
'class' => 'mihaildev\elfinder\UserPath',
'path' => '../../storage/user_{id}',
'name' => 'My Documents'
],
],
'watermark' => [
'source' => __DIR__.'/logo.png', // Path to Water mark image
'marginRight' => 5, // Margin right pixel
'marginBottom' => 5, // Margin bottom pixel
'quality' => 95, // JPEG image save quality
'transparency' => 70, // Water mark image transparency ( other than PNG )
'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP, // Target image formats ( bit-field )
'targetMinPixel' => 200 // Target image minimum pixel size
]
],
'artbox-comment' => [
'class' => \common\modules\comment\Controller::className(),
],
],
'components' => [
'assetManager' => [
'bundles' => [
'yii\web\JqueryAsset' =>[
'jsOptions' => ['position' => \yii\web\View::POS_HEAD]
]
],
],
|
377b29c7
Yarik
Yarik comment
|
39
40
41
|
'authManager' => [
'class' => 'yii\rbac\DbManager',
],
|
a8370482
Alexander Karnovsky
init project
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
'cache' => [
'class' => 'yii\caching\FileCache',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'module/<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
]
],
'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',
],
],
],
],
|
1f90c5f4
Karnovsky A
ArtboxImage resizer
|
72
73
74
|
'artboximage' => [
'class' => 'common\components\artboximage\ArtboxImage',
'driver' => 'GD', //GD or Imagick
|
68b181f0
Karnovsky A
Slider resizer
|
75
76
|
'rootPath' => Yii::getAlias('@storage'),
'rootUrl' => Yii::getAlias('/storage'),
|
1f90c5f4
Karnovsky A
ArtboxImage resizer
|
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
'presets' => [
'product' => [
'resize' => [
'width' => 300,
'height' => 300,
'master' => null
],
/*'flip' => [
'direction' => \common\components\artboximage\drivers\Image::HORIZONTAL
]*/
],
'brandlist' => [
'resize' => [
'width' => 138,
'height' => 78,
'master' => null
],
],
'product_trumb' => [
'resize' => [
|
4b2e90e0
Karnovsky A
fixes
|
97
98
|
'width' => 77,
'height' => 77,
|
1f90c5f4
Karnovsky A
ArtboxImage resizer
|
99
100
101
102
103
104
|
'master' => null
],
],
'product_list' => [
'resize' => [
'width' => 130,
|
d6788455
Karnovsky A
fixes
|
105
|
'height' => 130,
|
1f90c5f4
Karnovsky A
ArtboxImage resizer
|
106
107
108
109
110
111
112
113
114
115
116
117
|
'master' => null
],
],
'product_list2' => [
'resize' => [
'width' => 130,
'height' => 70,
'master' => null
],
],
'mainmenu' => [
'resize' => [
|
62b8b288
Administrator
26.05.16 change i...
|
118
119
|
'width' => 128,
'height' => 128,
|
1f90c5f4
Karnovsky A
ArtboxImage resizer
|
120
121
122
123
124
|
'master' => null
],
],
'large' => [
'resize' => [
|
49b00707
Karnovsky A
ArtboxImage lightbox
|
125
126
|
'width' => 1200,
'height' => 800,
|
1f90c5f4
Karnovsky A
ArtboxImage resizer
|
127
128
129
|
'master' => null
],
],
|
68b181f0
Karnovsky A
Slider resizer
|
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
'event_list' => [
'resize' => [
'width' => 200,
'height' => 200,
'master' => null
],
],
'slider' => [
'resize' => [
'width' => 1920,
'height' => null,
'master' => 'width'
],
'crop' => [
'width' => 1920,
'height' => 480
]
],
|
1f90c5f4
Karnovsky A
ArtboxImage resizer
|
148
149
|
]
],
|
a8370482
Alexander Karnovsky
init project
|
150
151
152
|
],
'modules' => [
|
9f3f9a44
Administrator
26.05.16 change i...
|
153
154
155
|
'file' => [
'class' => 'common\modules\file\Module',
],
|
a8370482
Alexander Karnovsky
init project
|
156
157
158
159
160
161
162
163
164
|
'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',
|
14eadb86
Karnovsky A
Eager loading for...
|
165
166
|
'listField' => 'name',
'searchField' => 'name',
|
a8370482
Alexander Karnovsky
init project
|
167
168
169
170
|
'key' => 'product_id',
'linked_key' => 'product_id',
],
'entity2' => [
|
b519af22
Karnovsky A
Base-product func...
|
171
|
'model' => '\common\modules\product\models\Category',
|
a8370482
Alexander Karnovsky
init project
|
172
|
'label' => 'Category',
|
14eadb86
Karnovsky A
Eager loading for...
|
173
174
175
|
'listField' => 'categoryName.value',
'searchField' => 'category_name.value',
'searchJoin' => 'categoryName',
|
b519af22
Karnovsky A
Base-product func...
|
176
|
'key' => 'category_id',
|
a8370482
Alexander Karnovsky
init project
|
177
|
'linked_key' => 'category_id',
|
a8370482
Alexander Karnovsky
init project
|
178
|
'hierarchy' => [
|
b519af22
Karnovsky A
Base-product func...
|
179
|
'key' => 'category_id',
|
a8370482
Alexander Karnovsky
init project
|
180
181
182
183
184
185
186
|
'parentKey' => 'parent_id',
]
],
'via' => [
'model' => '\common\modules\product\models\ProductCategory',
]
],
|
5aa7418e
Karnovsky A
Base-product#3 fu...
|
187
188
189
190
191
192
193
194
195
196
197
198
199
|
'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',
|
6fa713ca
Karnovsky A
Catalog v 1.2
|
200
|
'listField' => 'ValueRenderFlash',
|
5aa7418e
Karnovsky A
Base-product#3 fu...
|
201
202
203
204
205
206
207
|
'key' => 'tax_option_id',
'linked_key' => 'option_id',
],
'via' => [
'model' => 'common\modules\product\models\ProductOption',
]
],
|
b519af22
Karnovsky A
Base-product func...
|
208
209
|
'tax_group_to_category' => [
'name' => Yii::t('product', 'Характеристики по категориям'),
|
b15c889e
Karnovsky A
Base-product#2 fu...
|
210
|
'field' => 'group_to_category',
|
b519af22
Karnovsky A
Base-product func...
|
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
'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',
]
],
/*
|
a8370482
Alexander Karnovsky
init project
|
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
|
'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',
]
|
b519af22
Karnovsky A
Base-product func...
|
326
|
]*/
|
a8370482
Alexander Karnovsky
init project
|
327
328
329
330
|
]
],
'comment' => [
'class' => 'common\modules\comment\Module',
|
a8370482
Alexander Karnovsky
init project
|
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
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
'useRbac' => true,
'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,
],
],
],
],
],
|
a8370482
Alexander Karnovsky
init project
|
371
|
];
|