@@ -8,17 +8,17 @@ discard block |
||
8 | 8 | /* @var Product[] $products */ |
9 | 9 | /* @var Pagination $pagination */ |
10 | 10 | |
11 | -$this->params['breadcrumbs'][] = $model->{'title_'.$this->params['shortLanguage']}; |
|
11 | +$this->params[ 'breadcrumbs' ][ ] = $model->{'title_'.$this->params[ 'shortLanguage' ]}; |
|
12 | 12 | ?> |
13 | 13 | |
14 | -<?php if (!empty($model->{'content_'.$this->params['shortLanguage']})): ?> |
|
14 | +<?php if (!empty($model->{'content_'.$this->params[ 'shortLanguage' ]})): ?> |
|
15 | 15 | <section class="inform_block"> |
16 | 16 | |
17 | 17 | <div class="container"> |
18 | 18 | |
19 | 19 | <div class="row" data-animated="fadeIn"> |
20 | 20 | <div class="col-lg-12 col-md-12 col-sm-10"> |
21 | - <?php echo $model->{'content_'.$this->params['shortLanguage']} ?> |
|
21 | + <?php echo $model->{'content_'.$this->params[ 'shortLanguage' ]} ?> |
|
22 | 22 | </div> |
23 | 23 | </div> |
24 | 24 | </div> |
@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | <div class="post"> |
37 | 37 | <h2> |
38 | 38 | <span class="<?php echo $product->icon ?>"></span> |
39 | - <a href="<?php echo '/'.$this->params['shortLanguage'].'/product/'.$product->alias ?>" alt="<?php echo $product->{'title_'.$this->params['shortLanguage']} ?>"> |
|
40 | - <?php echo $product->{'title_'.$this->params['shortLanguage']} ?> |
|
39 | + <a href="<?php echo '/'.$this->params[ 'shortLanguage' ].'/product/'.$product->alias ?>" alt="<?php echo $product->{'title_'.$this->params[ 'shortLanguage' ]} ?>"> |
|
40 | + <?php echo $product->{'title_'.$this->params[ 'shortLanguage' ]} ?> |
|
41 | 41 | </a> |
42 | 42 | </h2> |
43 | 43 | <div class="post_meta"><?php echo Yii::t('products', 'Posted').' '.BaseHelper::getDateAt($product->updated_at) ?></div> |
44 | - <?php echo $product->{'description_'.$this->params['shortLanguage']} ?> |
|
44 | + <?php echo $product->{'description_'.$this->params[ 'shortLanguage' ]} ?> |
|
45 | 45 | </div> |
46 | - <?php endforeach;?> |
|
47 | - <?php echo LinkPager::widget(['pagination' => $pagination]); ?> |
|
46 | + <?php endforeach; ?> |
|
47 | + <?php echo LinkPager::widget([ 'pagination' => $pagination ]); ?> |
|
48 | 48 | </div> |
49 | 49 | </div> |
50 | 50 | </div> |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | /** |
49 | 49 | * @var array |
50 | 50 | */ |
51 | - public $albums = []; |
|
51 | + public $albums = [ ]; |
|
52 | 52 | |
53 | 53 | /** |
54 | 54 | * Initialize. |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | [ |
111 | 111 | 'alias', |
112 | 112 | 'filter', |
113 | - 'filter' => function ($value) { |
|
114 | - return preg_replace( '/[^a-z0-9_]+/', '-', strtolower(trim($value))); |
|
113 | + 'filter' => function($value) { |
|
114 | + return preg_replace('/[^a-z0-9_]+/', '-', strtolower(trim($value))); |
|
115 | 115 | } |
116 | 116 | ], |
117 | 117 | [ |
@@ -128,12 +128,12 @@ discard block |
||
128 | 128 | 'exist', |
129 | 129 | 'skipOnError' => true, |
130 | 130 | 'targetClass' => Page::class, |
131 | - 'targetAttribute' => ['pageId' => 'id'] |
|
131 | + 'targetAttribute' => [ 'pageId' => 'id' ] |
|
132 | 132 | ], |
133 | 133 | [ |
134 | 134 | UploadModelInterface::FILE_TYPE_THUMB, |
135 | - function($attribute){ |
|
136 | - if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})){ |
|
135 | + function($attribute) { |
|
136 | + if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})) { |
|
137 | 137 | $this->addError($attribute, 'Tumbnail content must be a numeric or string.'); |
138 | 138 | } |
139 | 139 | }, |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | [ |
152 | 152 | 'albums', |
153 | 153 | 'each', |
154 | - 'rule' => ['integer'], |
|
154 | + 'rule' => [ 'integer' ], |
|
155 | 155 | ], |
156 | 156 | ]; |
157 | 157 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | /** |
44 | 44 | * @var array |
45 | 45 | */ |
46 | - public $albums = []; |
|
46 | + public $albums = [ ]; |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * @var int |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | [ |
111 | 111 | 'alias', |
112 | 112 | 'filter', |
113 | - 'filter' => function ($value) { |
|
114 | - return preg_replace( '/[^a-z0-9_]+/', '-', strtolower(trim($value))); |
|
113 | + 'filter' => function($value) { |
|
114 | + return preg_replace('/[^a-z0-9_]+/', '-', strtolower(trim($value))); |
|
115 | 115 | } |
116 | 116 | ], |
117 | 117 | [ |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | ], |
124 | 124 | [ |
125 | 125 | UploadModelInterface::FILE_TYPE_THUMB, |
126 | - function($attribute){ |
|
127 | - if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})){ |
|
126 | + function($attribute) { |
|
127 | + if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})) { |
|
128 | 128 | $this->addError($attribute, 'Tumbnail content must be a numeric or string.'); |
129 | 129 | } |
130 | 130 | }, |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | [ |
134 | 134 | 'albums', |
135 | 135 | 'each', |
136 | - 'rule' => ['integer'], |
|
136 | + 'rule' => [ 'integer' ], |
|
137 | 137 | ], |
138 | 138 | ]; |
139 | 139 | } |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | 'home' => HomeController::class, |
61 | 61 | 'sitemap' => SitemapController::class |
62 | 62 | ], |
63 | - 'accessRoles' => ['admin', 'manager'], |
|
63 | + 'accessRoles' => [ 'admin', 'manager' ], |
|
64 | 64 | 'components' => [ |
65 | - 'view' => require __DIR__ . '/view-component.php', |
|
66 | - 'multilanguage-validate-component' => require __DIR__ .'/multilanguage-validate-component.php', |
|
65 | + 'view' => require __DIR__.'/view-component.php', |
|
66 | + 'multilanguage-validate-component' => require __DIR__.'/multilanguage-validate-component.php', |
|
67 | 67 | ], |
68 | 68 | 'isMultilanguage' => true, |
69 | 69 | ], |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | 'permissions' => PermissionController::class, |
76 | 76 | 'profiles' => ProfileController::class |
77 | 77 | ], |
78 | - 'accessRoles' => ['admin', 'manager'], |
|
78 | + 'accessRoles' => [ 'admin', 'manager' ], |
|
79 | 79 | 'components' => [ |
80 | - 'view' => require __DIR__ . '/view-component.php', |
|
80 | + 'view' => require __DIR__.'/view-component.php', |
|
81 | 81 | ], |
82 | 82 | ], |
83 | 83 | 'mfuploader' => [ |
@@ -94,14 +94,14 @@ discard block |
||
94 | 94 | 'text-album' => TextAlbumController::class, |
95 | 95 | 'other-album' => OtherAlbumController::class, |
96 | 96 | ], |
97 | - 'accessRoles' => ['admin', 'manager'], |
|
97 | + 'accessRoles' => [ 'admin', 'manager' ], |
|
98 | 98 | 'defaultStorageType' => MFUModule::STORAGE_TYPE_LOCAL, |
99 | - 'previewOptions' => require __DIR__ . '/../preview-options.php', |
|
99 | + 'previewOptions' => require __DIR__.'/../preview-options.php', |
|
100 | 100 | 'components' => [ |
101 | 101 | 'local-upload-component' => [ |
102 | 102 | 'class' => LocalUploadComponent::class, |
103 | 103 | 'checkExtensionByMimeType' => false, |
104 | - 'uploadRoot' => dirname($_SERVER['SCRIPT_FILENAME']) |
|
104 | + 'uploadRoot' => dirname($_SERVER[ 'SCRIPT_FILENAME' ]) |
|
105 | 105 | ], |
106 | 106 | /*'s3-upload-component' => [ |
107 | 107 | 'class' => S3UploadComponent::class, |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | 'region' => 'us-west-2', |
111 | 111 | 's3DefaultBucket' => 'filesmodule2', |
112 | 112 | ],*/ |
113 | - 'view' => require __DIR__ . '/view-component.php', |
|
113 | + 'view' => require __DIR__.'/view-component.php', |
|
114 | 114 | ], |
115 | - 'publicBaseUrl' => $webConfig['homeUrl'] |
|
115 | + 'publicBaseUrl' => $webConfig[ 'homeUrl' ] |
|
116 | 116 | ] |
117 | 117 | ], |
118 | 118 | 'components' => [ |
@@ -3,14 +3,14 @@ discard block |
||
3 | 3 | use Itstructure\AdminModule\Module as AdminModule; |
4 | 4 | use Itstructure\MFUploader\Module as MFUModule; |
5 | 5 | |
6 | -$params = require __DIR__ . '/params.php'; |
|
7 | -$db = require __DIR__ . '/db.php'; |
|
8 | -$baseUrl = require __DIR__ . '/base-url.php'; |
|
6 | +$params = require __DIR__.'/params.php'; |
|
7 | +$db = require __DIR__.'/db.php'; |
|
8 | +$baseUrl = require __DIR__.'/base-url.php'; |
|
9 | 9 | |
10 | 10 | $config = [ |
11 | 11 | 'id' => 'yii2-template-multilanguage-console', |
12 | 12 | 'basePath' => dirname(__DIR__), |
13 | - 'bootstrap' => ['log'], |
|
13 | + 'bootstrap' => [ 'log' ], |
|
14 | 14 | 'controllerNamespace' => 'app\commands', |
15 | 15 | 'aliases' => [ |
16 | 16 | '@bower' => '@vendor/bower-asset', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | 'targets' => [ |
33 | 33 | [ |
34 | 34 | 'class' => 'yii\log\FileTarget', |
35 | - 'levels' => ['error', 'warning'], |
|
35 | + 'levels' => [ 'error', 'warning' ], |
|
36 | 36 | ], |
37 | 37 | ], |
38 | 38 | ], |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | |
65 | 65 | if (YII_ENV_DEV) { |
66 | 66 | // configuration adjustments for 'dev' environment |
67 | - $config['bootstrap'][] = 'gii'; |
|
68 | - $config['modules']['gii'] = [ |
|
67 | + $config[ 'bootstrap' ][ ] = 'gii'; |
|
68 | + $config[ 'modules' ][ 'gii' ] = [ |
|
69 | 69 | 'class' => 'yii\gii\Module', |
70 | 70 | ]; |
71 | 71 | } |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$params = require __DIR__ . '/params.php'; |
|
4 | -$db = require __DIR__ . '/db.php'; |
|
5 | -$translations = require __DIR__ . '/translations.php'; |
|
6 | -$baseUrl = require __DIR__ . '/base-url.php'; |
|
3 | +$params = require __DIR__.'/params.php'; |
|
4 | +$db = require __DIR__.'/db.php'; |
|
5 | +$translations = require __DIR__.'/translations.php'; |
|
6 | +$baseUrl = require __DIR__.'/base-url.php'; |
|
7 | 7 | |
8 | 8 | $config = [ |
9 | 9 | 'id' => 'yii2_template_multilanguage', |
10 | 10 | 'version' => '1.0.0', |
11 | 11 | 'basePath' => dirname(__DIR__), |
12 | 12 | 'homeUrl' => $baseUrl, |
13 | - 'bootstrap' => ['log'], |
|
13 | + 'bootstrap' => [ 'log' ], |
|
14 | 14 | 'language' => 'en-US', |
15 | 15 | 'aliases' => [ |
16 | 16 | '@bower' => '@vendor/bower-asset', |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | 'targets' => [ |
53 | 53 | [ |
54 | 54 | 'class' => 'yii\log\FileTarget', |
55 | - 'levels' => ['error', 'warning'], |
|
55 | + 'levels' => [ 'error', 'warning' ], |
|
56 | 56 | ], |
57 | 57 | ], |
58 | 58 | ], |
@@ -102,18 +102,18 @@ discard block |
||
102 | 102 | |
103 | 103 | if (YII_ENV_DEV) { |
104 | 104 | // configuration adjustments for 'dev' environment |
105 | - $config['bootstrap'][] = 'debug'; |
|
106 | - $config['modules']['debug'] = [ |
|
105 | + $config[ 'bootstrap' ][ ] = 'debug'; |
|
106 | + $config[ 'modules' ][ 'debug' ] = [ |
|
107 | 107 | 'class' => 'yii\debug\Module', |
108 | 108 | // uncomment the following to add your IP if you are not connecting from localhost. |
109 | - 'allowedIPs' => ['127.0.0.1', '::1', '*'], |
|
109 | + 'allowedIPs' => [ '127.0.0.1', '::1', '*' ], |
|
110 | 110 | ]; |
111 | 111 | |
112 | - $config['bootstrap'][] = 'gii'; |
|
113 | - $config['modules']['gii'] = [ |
|
112 | + $config[ 'bootstrap' ][ ] = 'gii'; |
|
113 | + $config[ 'modules' ][ 'gii' ] = [ |
|
114 | 114 | 'class' => 'yii\gii\Module', |
115 | 115 | // uncomment the following to add your IP if you are not connecting from localhost. |
116 | - 'allowedIPs' => ['127.0.0.1', '::1', '*'], |
|
116 | + 'allowedIPs' => [ '127.0.0.1', '::1', '*' ], |
|
117 | 117 | ]; |
118 | 118 | } |
119 | 119 |