Blame view

backend/config/main.php 6.46 KB
1755c393   Yarik   Basic template in...
1
  <?php
9af79e71   Yarik   Sitemap and slugb...
2
      use artbox\core\components\SeoUrlManager;
aee73024   Yarik   Artbox great prep...
3
      use artbox\core\components\Sitemap;
a42025b8   Yarik   Sitemap and slugb...
4
      use artbox\core\models\Page;
6966d71b   Yarik   Makeup
5
      
b66c9c5a   Alexey Boroda   -Admin template s...
6
7
8
9
10
11
12
13
      $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 [
9a9d88ed   Yarik   Order
14
          'language'            => 'ru-RU',
b66c9c5a   Alexey Boroda   -Admin template s...
15
16
17
18
19
          'id'                  => 'app-backend',
          'homeUrl'             => '/admin',
          'basePath'            => dirname(__DIR__),
          'controllerNamespace' => 'backend\controllers',
          'bootstrap'           => [ 'log' ],
40ab364c   Yarik   Page
20
          'controllerMap'       => [
aee73024   Yarik   Artbox great prep...
21
22
23
              'profile'                            => 'artbox\core\controllers\ProfileController',
              'page'                               => 'artbox\core\controllers\PageController',
              'alias'                              => 'artbox\core\controllers\AliasController',
f3f451c2   Yarik   Groups completed
24
25
26
27
28
29
30
31
32
33
34
              'seo'                                => 'artbox\core\controllers\SeoController',
              'feedback'                           => 'artbox\core\controllers\FeedbackController',
              'weblog-article'                     => 'artbox\weblog\controllers\ArticleController',
              'category'                           => 'artbox\catalog\controllers\CategoryController',
              'brand'                              => 'artbox\catalog\controllers\BrandController',
              'product'                            => 'artbox\catalog\controllers\ProductController',
              'variant'                            => 'artbox\catalog\controllers\VariantController',
              'variant-option-group-complementary' => 'artbox\catalog\controllers\VariantOptionGroupComplController',
              'variant-option-group-exclusion'     => 'artbox\catalog\controllers\VariantOptionGroupExclController',
              'product-option-group-complementary' => 'artbox\catalog\controllers\ProductOptionGroupComplController',
              'product-option-group-exclusion'     => 'artbox\catalog\controllers\ProductOptionGroupExclController',
ffa10251   Alexey Boroda   -Blog in process
35
36
37
              'variant-option-complementary'       => 'artbox\catalog\controllers\VariantOptionComplController',
              'variant-option-exclusion'           => 'artbox\catalog\controllers\VariantOptionExclController',
              'product-option-complementary'       => 'artbox\catalog\controllers\ProductOptionComplController',
bc14df20   Yarik   Pre stable ready
38
39
40
41
42
43
44
45
46
47
48
49
              'product-option-exclusion'           => 'artbox\catalog\controllers\ProductOptionExclController',
              'import'                             => 'artbox\catalog\controllers\ImportController',
              'blog-article'                       => 'artbox\weblog\controllers\ArticleController',
              'blog-category'                      => 'artbox\weblog\controllers\CategoryController',
              'blog-tag'                           => 'artbox\weblog\controllers\TagController',
              'order'                              => 'artbox\order\controllers\OrderController',
              'order-product'                      => 'artbox\order\controllers\OrderProductController',
              'label'                              => 'artbox\order\controllers\LabelController',
              'delivery'                           => 'artbox\order\controllers\DeliveryController',
              'payment'                            => 'artbox\order\controllers\PaymentController',
              'sitemap'                            => 'artbox\core\controllers\SitemapController',
              'comment'                            => [
a00f1f42   Yarik   Social auth + vie...
50
51
52
                  'class'    => 'artbox\webcomment\controllers\ManageController',
                  'viewPath' => '@artbox/webcomment/views/manage',
              ],
bc14df20   Yarik   Pre stable ready
53
              'export'                             => 'artbox\catalog\controllers\ExportController',
8ea2bb09   Alexey Boroda   -Settings started
54
          ],
b66c9c5a   Alexey Boroda   -Admin template s...
55
          'components'          => [
6966d71b   Yarik   Makeup
56
              'assetManager'       => [
3e16e218   Yarik   Admin fixes
57
                  'bundles'         => [
219af3d1   Alexey Boroda   -Image manager ready
58
                      'yiister\gentelella\assets\ThemeAsset' => [
543b9b1c   Yarik   Composer ready
59
60
61
                          'basePath' => '@webroot',
                          'baseUrl'  => '@web',
                          'js'       => [
219af3d1   Alexey Boroda   -Image manager ready
62
63
                              'js/custom.js',
                          ],
543b9b1c   Yarik   Composer ready
64
                          'css'      => [
219af3d1   Alexey Boroda   -Image manager ready
65
66
67
68
                              'css/custom.css',
                          ],
                      ],
                  ],
3e16e218   Yarik   Admin fixes
69
                  'appendTimestamp' => true,
219af3d1   Alexey Boroda   -Image manager ready
70
              ],
6966d71b   Yarik   Makeup
71
              'request'            => [
b66c9c5a   Alexey Boroda   -Admin template s...
72
73
74
                  'csrfParam' => '_csrf-backend',
                  'baseUrl'   => '/admin',
              ],
6966d71b   Yarik   Makeup
75
              'user'               => [
9576f402   Yarik   Namespaces and al...
76
                  'identityClass'   => 'artbox\core\models\User',
b66c9c5a   Alexey Boroda   -Admin template s...
77
78
79
80
                  'enableAutoLogin' => true,
                  'identityCookie'  => [
                      'name'     => '_identity-backend',
                      'httpOnly' => true,
1755c393   Yarik   Basic template in...
81
82
                  ],
              ],
6966d71b   Yarik   Makeup
83
              'session'            => [
b66c9c5a   Alexey Boroda   -Admin template s...
84
85
86
                  // this is the name of the session cookie used for login on the backend
                  'name' => 'advanced-backend',
              ],
6966d71b   Yarik   Makeup
87
              'log'                => [
b66c9c5a   Alexey Boroda   -Admin template s...
88
89
90
91
92
93
94
95
96
97
98
                  'traceLevel' => YII_DEBUG ? 3 : 0,
                  'targets'    => [
                      [
                          'class'  => 'yii\log\FileTarget',
                          'levels' => [
                              'error',
                              'warning',
                          ],
                      ],
                  ],
              ],
6966d71b   Yarik   Makeup
99
              'errorHandler'       => [
b66c9c5a   Alexey Boroda   -Admin template s...
100
101
                  'errorAction' => 'site/error',
              ],
6966d71b   Yarik   Makeup
102
103
104
105
106
107
              'urlManager'         => [
                  'enablePrettyUrl' => true,
                  'showScriptName'  => false,
                  'rules'           => [],
              ],
              'urlManagerFrontend' => [
9af79e71   Yarik   Sitemap and slugb...
108
                  'class'           => SeoUrlManager::className(),
6966d71b   Yarik   Makeup
109
                  'baseUrl'         => '/',
b66c9c5a   Alexey Boroda   -Admin template s...
110
111
112
                  'enablePrettyUrl' => true,
                  'showScriptName'  => false,
                  'rules'           => [],
1755c393   Yarik   Basic template in...
113
              ],
a42025b8   Yarik   Sitemap and slugb...
114
115
116
117
118
119
120
121
              'sitemap'            => [
                  'class'    => Sitemap::className(),
                  'entities' => [
                      [
                          'class'      => Page::className(),
                          'conditions' => [
                              [ 'in_menu' => 1 ],
                          ],
9af79e71   Yarik   Sitemap and slugb...
122
                          'url'        => 'page/view',
a42025b8   Yarik   Sitemap and slugb...
123
124
125
                      ],
                  ],
              ],
1755c393   Yarik   Basic template in...
126
          ],
b66c9c5a   Alexey Boroda   -Admin template s...
127
128
          'params'              => $params,
      ];