Blame view

backend/config/main.php 3.83 KB
1755c393   Yarik   Basic template in...
1
  <?php
9af79e71   Yarik   Sitemap and slugb...
2
      use artbox\core\components\SeoUrlManager;
a42025b8   Yarik   Sitemap and slugb...
3
4
      use artbox\core\models\Page;
      use common\components\Sitemap;
6966d71b   Yarik   Makeup
5
      
b66c9c5a   Alexey Boroda   -Admin template s...
6
7
8
9
10
11
12
13
14
15
16
17
18
      $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-backend',
          'homeUrl'             => '/admin',
          'basePath'            => dirname(__DIR__),
          'controllerNamespace' => 'backend\controllers',
          'bootstrap'           => [ 'log' ],
40ab364c   Yarik   Page
19
          'controllerMap'       => [
4acbd19d   Alexey Boroda   -Bar tabs
20
21
22
23
24
25
              'profile'        => 'artbox\core\controllers\ProfileController',
              'page'           => 'artbox\core\controllers\PageController',
              'alias'          => 'artbox\core\controllers\AliasController',
              'seo'            => 'artbox\core\controllers\SeoController',
              'feedback'       => 'artbox\core\controllers\FeedbackController',
              'weblog-article' => 'artbox\weblog\controllers\ArticleController',
bfe59de8   Alexey Boroda   -Category in process
26
              'category'       => 'artbox\catalog\controllers\CategoryController',
8ea2bb09   Alexey Boroda   -Settings started
27
          ],
b66c9c5a   Alexey Boroda   -Admin template s...
28
          'components'          => [
6966d71b   Yarik   Makeup
29
              'assetManager'       => [
3e16e218   Yarik   Admin fixes
30
                  'bundles'         => [
219af3d1   Alexey Boroda   -Image manager ready
31
                      'yiister\gentelella\assets\ThemeAsset' => [
543b9b1c   Yarik   Composer ready
32
33
34
                          'basePath' => '@webroot',
                          'baseUrl'  => '@web',
                          'js'       => [
219af3d1   Alexey Boroda   -Image manager ready
35
36
                              'js/custom.js',
                          ],
543b9b1c   Yarik   Composer ready
37
                          'css'      => [
219af3d1   Alexey Boroda   -Image manager ready
38
39
40
41
                              'css/custom.css',
                          ],
                      ],
                  ],
3e16e218   Yarik   Admin fixes
42
                  'appendTimestamp' => true,
219af3d1   Alexey Boroda   -Image manager ready
43
              ],
6966d71b   Yarik   Makeup
44
              'request'            => [
b66c9c5a   Alexey Boroda   -Admin template s...
45
46
47
                  'csrfParam' => '_csrf-backend',
                  'baseUrl'   => '/admin',
              ],
6966d71b   Yarik   Makeup
48
              'user'               => [
9576f402   Yarik   Namespaces and al...
49
                  'identityClass'   => 'artbox\core\models\User',
b66c9c5a   Alexey Boroda   -Admin template s...
50
51
52
53
                  'enableAutoLogin' => true,
                  'identityCookie'  => [
                      'name'     => '_identity-backend',
                      'httpOnly' => true,
1755c393   Yarik   Basic template in...
54
55
                  ],
              ],
6966d71b   Yarik   Makeup
56
              'session'            => [
b66c9c5a   Alexey Boroda   -Admin template s...
57
58
59
                  // this is the name of the session cookie used for login on the backend
                  'name' => 'advanced-backend',
              ],
6966d71b   Yarik   Makeup
60
              'log'                => [
b66c9c5a   Alexey Boroda   -Admin template s...
61
62
63
64
65
66
67
68
69
70
71
                  'traceLevel' => YII_DEBUG ? 3 : 0,
                  'targets'    => [
                      [
                          'class'  => 'yii\log\FileTarget',
                          'levels' => [
                              'error',
                              'warning',
                          ],
                      ],
                  ],
              ],
6966d71b   Yarik   Makeup
72
              'errorHandler'       => [
b66c9c5a   Alexey Boroda   -Admin template s...
73
74
                  'errorAction' => 'site/error',
              ],
6966d71b   Yarik   Makeup
75
76
77
78
79
80
              'urlManager'         => [
                  'enablePrettyUrl' => true,
                  'showScriptName'  => false,
                  'rules'           => [],
              ],
              'urlManagerFrontend' => [
9af79e71   Yarik   Sitemap and slugb...
81
                  'class'           => SeoUrlManager::className(),
6966d71b   Yarik   Makeup
82
                  'baseUrl'         => '/',
b66c9c5a   Alexey Boroda   -Admin template s...
83
84
85
                  'enablePrettyUrl' => true,
                  'showScriptName'  => false,
                  'rules'           => [],
1755c393   Yarik   Basic template in...
86
              ],
a42025b8   Yarik   Sitemap and slugb...
87
88
89
90
91
92
93
94
              'sitemap'            => [
                  'class'    => Sitemap::className(),
                  'entities' => [
                      [
                          'class'      => Page::className(),
                          'conditions' => [
                              [ 'in_menu' => 1 ],
                          ],
9af79e71   Yarik   Sitemap and slugb...
95
                          'url'        => 'page/view',
a42025b8   Yarik   Sitemap and slugb...
96
97
98
                      ],
                  ],
              ],
1755c393   Yarik   Basic template in...
99
          ],
b66c9c5a   Alexey Boroda   -Admin template s...
100
101
          'params'              => $params,
      ];