Blame view

backend/config/main.php 4.11 KB
1755c393   Yarik   Basic template in...
1
  <?php
6966d71b   Yarik   Makeup
2
3
      use yii\web\UrlManager;
      
b66c9c5a   Alexey Boroda   -Admin template s...
4
5
6
7
8
9
10
11
12
13
14
15
16
      $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
17
          'controllerMap'       => [
4acbd19d   Alexey Boroda   -Bar tabs
18
19
20
21
22
23
              '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',
8ea2bb09   Alexey Boroda   -Settings started
24
          ],
219af3d1   Alexey Boroda   -Image manager ready
25
26
          'modules'             => [
              'imagemanager' => [
40ab364c   Yarik   Page
27
28
29
                  'class'                => 'noam148\imagemanager\Module',
                  'canUploadImage'       => true,
                  'canRemoveImage'       => function () {
219af3d1   Alexey Boroda   -Image manager ready
30
31
32
                      return true;
                  },
                  'setBlameableBehavior' => false,
40ab364c   Yarik   Page
33
                  'cssFiles'             => [
219af3d1   Alexey Boroda   -Image manager ready
34
35
36
37
                      'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css',
                  ],
              ],
          ],
b66c9c5a   Alexey Boroda   -Admin template s...
38
          'components'          => [
6966d71b   Yarik   Makeup
39
              'assetManager'       => [
3e16e218   Yarik   Admin fixes
40
                  'bundles'         => [
219af3d1   Alexey Boroda   -Image manager ready
41
                      'yiister\gentelella\assets\ThemeAsset' => [
543b9b1c   Yarik   Composer ready
42
43
44
                          'basePath' => '@webroot',
                          'baseUrl'  => '@web',
                          'js'       => [
219af3d1   Alexey Boroda   -Image manager ready
45
46
                              'js/custom.js',
                          ],
543b9b1c   Yarik   Composer ready
47
                          'css'      => [
219af3d1   Alexey Boroda   -Image manager ready
48
49
50
51
                              'css/custom.css',
                          ],
                      ],
                  ],
3e16e218   Yarik   Admin fixes
52
                  'appendTimestamp' => true,
219af3d1   Alexey Boroda   -Image manager ready
53
              ],
6966d71b   Yarik   Makeup
54
              'imagemanager'       => [
40ab364c   Yarik   Page
55
56
57
                  'class'       => 'noam148\imagemanager\components\ImageManagerGetPath',
                  'mediaPath'   => dirname(dirname(__DIR__)) . '/storage',
                  'cachePath'   => 'assets/images',
219af3d1   Alexey Boroda   -Image manager ready
58
59
60
                  'useFilename' => true,
                  'absoluteUrl' => false,
              ],
6966d71b   Yarik   Makeup
61
              'request'            => [
b66c9c5a   Alexey Boroda   -Admin template s...
62
63
64
                  'csrfParam' => '_csrf-backend',
                  'baseUrl'   => '/admin',
              ],
6966d71b   Yarik   Makeup
65
              'user'               => [
9576f402   Yarik   Namespaces and al...
66
                  'identityClass'   => 'artbox\core\models\User',
b66c9c5a   Alexey Boroda   -Admin template s...
67
68
69
70
                  'enableAutoLogin' => true,
                  'identityCookie'  => [
                      'name'     => '_identity-backend',
                      'httpOnly' => true,
1755c393   Yarik   Basic template in...
71
72
                  ],
              ],
6966d71b   Yarik   Makeup
73
              'session'            => [
b66c9c5a   Alexey Boroda   -Admin template s...
74
75
76
                  // this is the name of the session cookie used for login on the backend
                  'name' => 'advanced-backend',
              ],
6966d71b   Yarik   Makeup
77
              'log'                => [
b66c9c5a   Alexey Boroda   -Admin template s...
78
79
80
81
82
83
84
85
86
87
88
                  'traceLevel' => YII_DEBUG ? 3 : 0,
                  'targets'    => [
                      [
                          'class'  => 'yii\log\FileTarget',
                          'levels' => [
                              'error',
                              'warning',
                          ],
                      ],
                  ],
              ],
6966d71b   Yarik   Makeup
89
              'errorHandler'       => [
b66c9c5a   Alexey Boroda   -Admin template s...
90
91
                  'errorAction' => 'site/error',
              ],
6966d71b   Yarik   Makeup
92
93
94
95
96
97
98
99
              'urlManager'         => [
                  'enablePrettyUrl' => true,
                  'showScriptName'  => false,
                  'rules'           => [],
              ],
              'urlManagerFrontend' => [
                  'class'           => UrlManager::className(),
                  'baseUrl'         => '/',
b66c9c5a   Alexey Boroda   -Admin template s...
100
101
102
                  'enablePrettyUrl' => true,
                  'showScriptName'  => false,
                  'rules'           => [],
1755c393   Yarik   Basic template in...
103
104
              ],
          ],
b66c9c5a   Alexey Boroda   -Admin template s...
105
106
          'params'              => $params,
      ];