Blame view

frontend/config/main.php 1.76 KB
b0f143c3   Yarik   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  <?php
  
  $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')
  );
  
  define ('IS_FRONT', TRUE);
  
  return [
      'id' => 'app-frontend',
      'basePath' => dirname(__DIR__),
      //'bootstrap' => ['log', 'PageController'],
658d13d4   Administrator   09.02.16
16
  //    'bootstrap' => ['log'],
b0f143c3   Yarik   first commit
17
18
19
20
      'controllerNamespace' => 'frontend\controllers',
      'modules' => [
  
      ],
658d13d4   Administrator   09.02.16
21
22
23
24
25
26
27
28
29
30
31
32
      'bootstrap' => [
  
          // название класса
          'common\components\UserCheck',
  
  
          // анонимная функция
          function () {
              return new common\components\UserCheck;
          }
      ],
  
71f66dca   Administrator   add Vitaliy's wid...
33
      'components' => [
b0f143c3   Yarik   first commit
34
35
36
          //'PageController'=>[
          //    'class' => 'frontend\controllers\PageController'
          //],
c8a3b6d1   Administrator   firs page
37
38
39
          'request' => [
              'class' => 'common\components\LangRequest'
          ],
b0f143c3   Yarik   first commit
40
41
42
43
          'user' => [
              'identityClass' => 'common\models\User',
              'enableAutoLogin' => true,
          ],
033f9331   Administrator   09.02.16
44
45
46
47
48
          'userinfo' => [
  
              'class' => 'frontend\components\UserInfo',
  
          ],
b0f143c3   Yarik   first commit
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
          'log' => [
              'traceLevel' => YII_DEBUG ? 3 : 0,
              'targets' => [
                  [
                      'class' => 'yii\log\FileTarget',
                      'levels' => ['error', 'warning'],
                  ],
              ],
          ],
          'errorHandler' => [
              'errorAction' => 'site/error',
          ],
          'urlManager' => [
              'baseUrl' => '/',
              'enablePrettyUrl' => true,
71f66dca   Administrator   add Vitaliy's wid...
64
              'showScriptName' => false,
b0f143c3   Yarik   first commit
65
                  'rules' => [
6e1510b2   Administrator   firs page
66
                      'landing/<view:[\w-]+>' => 'landing/view',
b0f143c3   Yarik   first commit
67
68
69
70
71
                  ]
          ],
      ],
      'params' => $params,
  ];