main.php 6.38 KB
<?php
return [
    'language'      => 'ru',
    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
    'controllerMap' => [
//        'artbox-comment' => [
//            'class' => \common\modules\comment\Controller::className(),
//        ],
    ],
    'components' => [
        'cache' => [
            'class' => 'yii\caching\DummyCache',
            'keyPrefix' => 'linija_'
        ],
        'sms' => [
            'class' => 'common\components\SmsSender',
        ],

        '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',
                    ],
                ],
                'artbox-comment' => [
                    'class' => 'yii\i18n\PhpMessageSource',
                    'basePath' => '@common/modules/comment/messages',
                    ],
                ],
        ],
        'artboximage' => [
            'class' => 'common\components\artboximage\ArtboxImage',
            'driver' => 'GD',  //GD or Imagick
            'rootPath' => Yii::getAlias('@storage'),
            'rootUrl' => Yii::getAlias('/storage'),
            'presets' => [
                'product' => [
                    'resize' => [
                        'width' => 300,
                        'height' => 300,
                        'master' => null
                    ],
                ],
                'product_variant' => [
                    'resize' => [
                        'width' => 38,
                        'height' => 38,
                        'master' => null
                    ],
                ],
                'product_trumb' => [
                    'resize' => [
                        'width' => 88,
                        'height' => 88,
                        'master' => null
                    ],
                ],
                'product_basket' => [
                    'resize' => [
                        'width' => 100,
                        'height' => 200,
                        'master' => null
                    ],
                ],
                'product_view' => [
                    'resize' => [
                        'width' => 392,
                        'height' => 365,
                        'master' => null
                    ],
                ],
                'iam' => [
                    'resize' => [
                        'width' => 120,
                        'height' => 240,
                        'master' => null
                    ],
                ],
                'slider' => [
                    'resize' => [
                        'width' => 1920,
                        'height' => 420,
                        'master' => null
                    ],
                ],
                'brandlist' => [
                    'resize' => [
                        'width' => 128,
                        'height' => 128,
                        'master' => null
                    ],
                ],
                'eventlist' => [
                    'resize' => [
                        'width' => 180,
                        'height' => 125,
                        'master' => null
                    ],
                ],
                'event_in_product' =>
                    [
                        'resize' => [
                            'width' => 730,
                            'height' => 100,
                            'master' => null
                        ],
                    ],
                'event_left' =>
                    [
                        'resize' => [
                            'width' => 1140,
                            'master' => null
                        ],
                    ],
                'brand_item' => [
                    'resize' => [
                        'width' => 125,
                        'height' => 54,
                        'master' => null
                    ],
                    'crop' => [
                        'width' => 150,
                        'height' => 150,
                        'master' => null
                    ],
                ],
                'mainmenu' => [
                    'resize' => [
                        'width' => 160,
                        'height' => 170,
                        'master' => null
                    ],
                ],
                'list' => [
                    'resize' => [
                        'width' => 134,
                        'height' => 200,
                        'master' => null
                    ],
                ],
                'banner_list' => [
                    'resize' => [
                        'width' => 105,
                        'height' => 25,
                        'master' => null
                    ],
                ],
                'large' => [
                    'resize' => [
                        'width' => 600,
                        'height' => 600,
                        'master' => null
                    ],
                ],
                'admin_thumb' => [
                    'resize' => [
                        'width' => 256,
                    ],
                ],
                'option_menu' => [
                    'resize' => [
                        'width' => 100,
                        'height' => 110,
                    ],
                ],
                'product_show'=>[
                    'resize' => [
                        'width' => 342,
                        'height' => 350,
                    ],
                ]
            ]
        ],
        'basket' => [
            'class' => 'common\models\Basket',
        ],
    ],

    'modules' => [
        'file' => [
            'class' => 'common\modules\file\Module',
        ],
    ],
];