Blame view

common/config/main.php 3.14 KB
a0e8d4e0   Alexey Boroda   first commit
1
2
  <?php
      use artbox\core\components\SeoComponent;
518c4e3f   Alexey Boroda   -Article with com...
3
      use artbox\webcomment\Module;
a0e8d4e0   Alexey Boroda   first commit
4
5
6
7
8
9
      
      $mail = require( 'filedb/mail.php' );
      
      return [
          'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
          'modules'    => [
518c4e3f   Alexey Boroda   -Article with com...
10
              'imagemanager'   => [
a0e8d4e0   Alexey Boroda   first commit
11
12
13
14
15
16
17
18
19
20
                  'class'                => 'artbox\core\components\imagemanager\Module',
                  'canUploadImage'       => true,
                  'canRemoveImage'       => function () {
                      return true;
                  },
                  'setBlameableBehavior' => false,
                  'cssFiles'             => [
                      'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css',
                  ],
              ],
518c4e3f   Alexey Boroda   -Article with com...
21
22
23
              'artbox-comment' => [
                  'class' => Module::className(),
              ],
a0e8d4e0   Alexey Boroda   first commit
24
25
26
27
28
29
30
          ],
          'components' => [
              'cache'        => [
                  'class' => 'yii\caching\FileCache',
              ],
              'i18n'         => [
                  'translations' => [
518c4e3f   Alexey Boroda   -Article with com...
31
                      'core'           => [
a0e8d4e0   Alexey Boroda   first commit
32
                          'class'    => 'yii\i18n\PhpMessageSource',
809b0ee3   Eugeny Galkovskiy   Переводы 1
33
                          'basePath' => '@common/messages',
a0e8d4e0   Alexey Boroda   first commit
34
                      ],
518c4e3f   Alexey Boroda   -Article with com...
35
                      'app'            => [
a0e8d4e0   Alexey Boroda   first commit
36
37
38
                          'class'    => 'yii\i18n\PhpMessageSource',
                          'basePath' => '@common/messages',
                      ],
518c4e3f   Alexey Boroda   -Article with com...
39
                      'blog'           => [
9ceb5beb   Alexey Boroda   -Blog started
40
                          'class'    => 'yii\i18n\PhpMessageSource',
e600c706   Eugeny Galkovskiy   Записаться на приём
41
                          'basePath' => '@common/messages',
9ceb5beb   Alexey Boroda   -Blog started
42
                      ],
be89e918   Alexey Boroda   -Comments added i...
43
44
                      'artbox-comment' => [
                          'class'    => 'yii\i18n\PhpMessageSource',
e600c706   Eugeny Galkovskiy   Записаться на приём
45
                          'basePath' => '@common/messages',
be89e918   Alexey Boroda   -Comments added i...
46
                      ],
a0e8d4e0   Alexey Boroda   first commit
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
                  ],
              ],
              'filedb'       => [
                  'class' => 'yii2tech\filedb\Connection',
                  'path'  => '@common/config/filedb',
              ],
              'sitemapdb'    => [
                  'class'          => 'yii2tech\filedb\Connection',
                  'path'           => '@common/config/filedb',
                  'primaryKeyName' => 'id',
              ],
              'seo'          => [
                  'class' => SeoComponent::className(),
              ],
              'imagemanager' => [
                  'class'       => 'artbox\core\components\imagemanager\components\ImageManagerGetPath',
                  'mediaPath'   => dirname(dirname(__DIR__)) . '/storage',
                  'cachePath'   => '../../storage/cache',
                  'useFilename' => true,
                  'absoluteUrl' => false,
              ],
              'smtpmailer'   => [
                  'class'     => 'yii\swiftmailer\Mailer',
                  'transport' => [
                      'class'      => 'Swift_SmtpTransport',
                      'host'       => $mail[ 1 ][ 'host' ],
                      'username'   => $mail[ 1 ][ 'user' ],
                      'password'   => $mail[ 1 ][ 'pass' ],
                      'port'       => '587',
                      'encryption' => 'tls',
                  ],
518c4e3f   Alexey Boroda   -Article with com...
78
                  'viewPath'  => '@common/mail',
a0e8d4e0   Alexey Boroda   first commit
79
80
81
              ],
          ],
      ];