Blame view

backend/config/main.php 3.76 KB
1755c393   Yarik   Basic template in...
1
  <?php
b66c9c5a   Alexey Boroda   -Admin template s...
2
3
4
5
6
7
8
9
10
11
12
13
14
      $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
15
          'controllerMap'       => [
8ea2bb09   Alexey Boroda   -Settings started
16
              'settings' => 'artweb\artbox\core\controllers\SettingsController',
0ffdb7f9   Yarik   Merge branch 'mas...
17
              'profile'  => 'artweb\artbox\core\controllers\ProfileController',
40ab364c   Yarik   Page
18
              'page'     => 'artweb\artbox\core\controllers\PageController',
d32ce157   Yarik   Alias
19
              'seo'      => 'artweb\artbox\core\controllers\AliasController',
fe49a639   Alexey Boroda   -Feedback in process
20
              'feedback' => 'artweb\artbox\core\controllers\FeedbackController',
8ea2bb09   Alexey Boroda   -Settings started
21
          ],
219af3d1   Alexey Boroda   -Image manager ready
22
23
          'modules'             => [
              'imagemanager' => [
40ab364c   Yarik   Page
24
25
26
                  'class'                => 'noam148\imagemanager\Module',
                  'canUploadImage'       => true,
                  'canRemoveImage'       => function () {
219af3d1   Alexey Boroda   -Image manager ready
27
28
29
                      return true;
                  },
                  'setBlameableBehavior' => false,
40ab364c   Yarik   Page
30
                  'cssFiles'             => [
219af3d1   Alexey Boroda   -Image manager ready
31
32
33
34
                      'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css',
                  ],
              ],
          ],
b66c9c5a   Alexey Boroda   -Admin template s...
35
          'components'          => [
219af3d1   Alexey Boroda   -Image manager ready
36
37
38
39
40
41
42
43
44
45
46
47
48
              'assetManager' => [
                  'bundles' => [
                      'yiister\gentelella\assets\ThemeAsset' => [
                          'sourcePath' => '@backend/assets/',
                          'js'         => [
                              'js/custom.js',
                          ],
                          'css'        => [
                              'css/custom.css',
                          ],
                      ],
                  ],
              ],
40ab364c   Yarik   Page
49
              'filedb'       => [
8ea2bb09   Alexey Boroda   -Settings started
50
                  'class' => 'yii2tech\filedb\Connection',
40ab364c   Yarik   Page
51
                  'path'  => '@common/config',
8ea2bb09   Alexey Boroda   -Settings started
52
              ],
219af3d1   Alexey Boroda   -Image manager ready
53
              'imagemanager' => [
40ab364c   Yarik   Page
54
55
56
                  'class'       => 'noam148\imagemanager\components\ImageManagerGetPath',
                  'mediaPath'   => dirname(dirname(__DIR__)) . '/storage',
                  'cachePath'   => 'assets/images',
219af3d1   Alexey Boroda   -Image manager ready
57
58
59
                  'useFilename' => true,
                  'absoluteUrl' => false,
              ],
b66c9c5a   Alexey Boroda   -Admin template s...
60
61
62
63
64
              'request'      => [
                  'csrfParam' => '_csrf-backend',
                  'baseUrl'   => '/admin',
              ],
              'user'         => [
0ffdb7f9   Yarik   Merge branch 'mas...
65
                  'identityClass'   => 'artweb\artbox\core\models\User',
b66c9c5a   Alexey Boroda   -Admin template s...
66
67
68
69
                  'enableAutoLogin' => true,
                  'identityCookie'  => [
                      'name'     => '_identity-backend',
                      'httpOnly' => true,
1755c393   Yarik   Basic template in...
70
71
                  ],
              ],
b66c9c5a   Alexey Boroda   -Admin template s...
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
              'session'      => [
                  // this is the name of the session cookie used for login on the backend
                  'name' => 'advanced-backend',
              ],
              'log'          => [
                  'traceLevel' => YII_DEBUG ? 3 : 0,
                  'targets'    => [
                      [
                          'class'  => 'yii\log\FileTarget',
                          'levels' => [
                              'error',
                              'warning',
                          ],
                      ],
                  ],
              ],
              'errorHandler' => [
                  'errorAction' => 'site/error',
              ],
              'urlManager'   => [
                  'enablePrettyUrl' => true,
                  'showScriptName'  => false,
                  'rules'           => [],
1755c393   Yarik   Basic template in...
95
96
              ],
          ],
b66c9c5a   Alexey Boroda   -Admin template s...
97
98
          'params'              => $params,
      ];