@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | 'filebrowserWindowHeight' => '700', |
46 | 46 | 'extraPlugins' => 'pbckcode', |
47 | 47 | 'toolbarGroups' => [ |
48 | - ['name' => 'pbckcode'] |
|
48 | + [ 'name' => 'pbckcode' ] |
|
49 | 49 | ], |
50 | 50 | 'allowedContent' => true, |
51 | - 'language' => $this->params['shortLanguage'], |
|
51 | + 'language' => $this->params[ 'shortLanguage' ], |
|
52 | 52 | ] |
53 | 53 | ], |
54 | 54 | [ |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | 'languageModel' => new Language() |
68 | 68 | ]) ?> |
69 | 69 | |
70 | - <?php echo $form->field($model, 'default')->checkbox(['value' => 1, 'label' => Yii::t('app', 'Set as default')]) ?> |
|
70 | + <?php echo $form->field($model, 'default')->checkbox([ 'value' => 1, 'label' => Yii::t('app', 'Set as default') ]) ?> |
|
71 | 71 | |
72 | 72 | </div> |
73 | 73 | </div> |
@@ -3,21 +3,21 @@ |
||
3 | 3 | /* @var $this Itstructure\AdminModule\components\AdminView */ |
4 | 4 | /* @var $model Itstructure\AdminModule\models\MultilanguageValidateModel */ |
5 | 5 | |
6 | -$this->title = Yii::t('home', 'Update home page').': ' . $model->mainModel->getDefaultTranslate('title'); |
|
7 | -$this->params['breadcrumbs'][] = [ |
|
6 | +$this->title = Yii::t('home', 'Update home page').': '.$model->mainModel->getDefaultTranslate('title'); |
|
7 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
8 | 8 | 'label' => Yii::t('home', 'Home page'), |
9 | 9 | 'url' => [ |
10 | - $this->params['urlPrefix'].'index' |
|
10 | + $this->params[ 'urlPrefix' ].'index' |
|
11 | 11 | ] |
12 | 12 | ]; |
13 | -$this->params['breadcrumbs'][] = [ |
|
13 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
14 | 14 | 'label' => $model->mainModel->getDefaultTranslate('title'), |
15 | 15 | 'url' => [ |
16 | - $this->params['urlPrefix'].'view', |
|
16 | + $this->params[ 'urlPrefix' ].'view', |
|
17 | 17 | 'id' => $model->id |
18 | 18 | ] |
19 | 19 | ]; |
20 | -$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); |
|
20 | +$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update'); |
|
21 | 21 | ?> |
22 | 22 | <div class="home-update"> |
23 | 23 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | /* @var $this Itstructure\AdminModule\components\AdminView */ |
10 | 10 | |
11 | 11 | $this->title = Yii::t('home', 'Home page'); |
12 | -$this->params['breadcrumbs'][] = $this->title; |
|
12 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
13 | 13 | ?> |
14 | 14 | <div class="home-index"> |
15 | 15 | |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | <p> |
19 | 19 | <?php echo Html::a(Yii::t('home', 'Create home page'), [ |
20 | - $this->params['urlPrefix'].'create' |
|
20 | + $this->params[ 'urlPrefix' ].'create' |
|
21 | 21 | ], [ |
22 | 22 | 'class' => 'btn btn-success' |
23 | 23 | ]) ?> |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /* @var $searchModel HomeSearch */ |
36 | 36 | return Html::a( |
37 | 37 | Html::encode($searchModel->getDefaultTranslate('title')), |
38 | - Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id]) |
|
38 | + Url::to([ $this->params[ 'urlPrefix' ].'view', 'id' => $searchModel->id ]) |
|
39 | 39 | ); |
40 | 40 | }, |
41 | 41 | 'format' => 'raw', |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | ], |
51 | 51 | [ |
52 | 52 | 'attribute' => 'created_at', |
53 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
53 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
54 | 54 | 'label' => Yii::t('app', 'Created date'), |
55 | 55 | ], |
56 | 56 | [ |
57 | 57 | 'attribute' => 'updated_at', |
58 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
58 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
59 | 59 | 'label' => Yii::t('app', 'Updated date'), |
60 | 60 | ], |
61 | 61 | 'default' => [ |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | return Html::a(Yii::t('app', 'Set as default'), Url::to([ |
72 | - $this->params['urlPrefix'].'set-default', |
|
72 | + $this->params[ 'urlPrefix' ].'set-default', |
|
73 | 73 | 'homeId' => $searchModel->id, |
74 | 74 | ]), [ |
75 | 75 | 'title' => Yii::t('app', 'Set as default'), |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | 'class' => 'yii\grid\ActionColumn', |
82 | 82 | 'header' => Yii::t('app', 'Actions'), |
83 | 83 | 'template' => '{view} {update} {delete}', |
84 | - 'urlCreator'=>function($action, $model, $key, $index){ |
|
84 | + 'urlCreator'=>function($action, $model, $key, $index) { |
|
85 | 85 | return Url::to([ |
86 | - $this->params['urlPrefix'].$action, |
|
86 | + $this->params[ 'urlPrefix' ].$action, |
|
87 | 87 | 'id' => $model->id |
88 | 88 | ]); |
89 | 89 | } |
@@ -9,13 +9,13 @@ discard block |
||
9 | 9 | /* @var $model app\models\Home */ |
10 | 10 | |
11 | 11 | $this->title = $model->getDefaultTranslate('title'); |
12 | -$this->params['breadcrumbs'][] = [ |
|
12 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
13 | 13 | 'label' => Yii::t('home', 'Home page'), |
14 | 14 | 'url' => [ |
15 | - $this->params['urlPrefix'].'index' |
|
15 | + $this->params[ 'urlPrefix' ].'index' |
|
16 | 16 | ] |
17 | 17 | ]; |
18 | -$this->params['breadcrumbs'][] = $this->title; |
|
18 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
19 | 19 | ?> |
20 | 20 | |
21 | 21 | <style> |
@@ -29,14 +29,14 @@ discard block |
||
29 | 29 | |
30 | 30 | <p> |
31 | 31 | <?php echo Html::a(Yii::t('app', 'Update'), [ |
32 | - $this->params['urlPrefix'].'update', |
|
32 | + $this->params[ 'urlPrefix' ].'update', |
|
33 | 33 | 'id' => $model->id |
34 | 34 | ], [ |
35 | 35 | 'class' => 'btn btn-primary' |
36 | 36 | ]) ?> |
37 | 37 | |
38 | 38 | <?php echo Html::a(Yii::t('app', 'Delete'), [ |
39 | - $this->params['urlPrefix'].'delete', |
|
39 | + $this->params[ 'urlPrefix' ].'delete', |
|
40 | 40 | 'id' => $model->id |
41 | 41 | ], [ |
42 | 42 | 'class' => 'btn btn-danger', |
@@ -83,22 +83,22 @@ discard block |
||
83 | 83 | 'label' => Yii::t('app', 'Default status'), |
84 | 84 | 'value' => function($model) { |
85 | 85 | /* @var $model app\models\Home */ |
86 | - if ($model->default == 1){ |
|
87 | - return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Default') . '</i>'; |
|
86 | + if ($model->default == 1) { |
|
87 | + return '<i class="fa fa-check-circle text-success"> '.Yii::t('app', 'Default').'</i>'; |
|
88 | 88 | } else { |
89 | - return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'No') . '</i>'; |
|
89 | + return '<i class="fa fa-times text-danger"> '.Yii::t('app', 'No').'</i>'; |
|
90 | 90 | } |
91 | 91 | }, |
92 | 92 | 'format' => 'raw', |
93 | 93 | ], |
94 | 94 | [ |
95 | 95 | 'attribute' => 'created_at', |
96 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
96 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
97 | 97 | 'label' => Yii::t('app', 'Created date'), |
98 | 98 | ], |
99 | 99 | [ |
100 | 100 | 'attribute' => 'updated_at', |
101 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
101 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
102 | 102 | 'label' => Yii::t('app', 'Updated date'), |
103 | 103 | ], |
104 | 104 | ], |
@@ -4,13 +4,13 @@ |
||
4 | 4 | /* @var $model Itstructure\AdminModule\models\MultilanguageValidateModel */ |
5 | 5 | |
6 | 6 | $this->title = Yii::t('home', 'Create home page'); |
7 | -$this->params['breadcrumbs'][] = [ |
|
7 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
8 | 8 | 'label' => Yii::t('home', 'Home page'), |
9 | 9 | 'url' => [ |
10 | - $this->params['urlPrefix'].'index' |
|
10 | + $this->params[ 'urlPrefix' ].'index' |
|
11 | 11 | ] |
12 | 12 | ]; |
13 | -$this->params['breadcrumbs'][] = Yii::t('app', 'Create'); |
|
13 | +$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Create'); |
|
14 | 14 | ?> |
15 | 15 | <div class="home-create"> |
16 | 16 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | /* @var $model app\models\RegForm */ |
10 | 10 | |
11 | 11 | $this->title = Yii::t('site', 'Register'); |
12 | -$this->params['breadcrumbs'][] = $this->title; |
|
12 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
13 | 13 | ?> |
14 | 14 | <section id="registration"> |
15 | 15 | <div class="container"> |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | 'layout' => 'horizontal', |
22 | 22 | 'fieldConfig' => [ |
23 | 23 | 'template' => "{label}\n<div class=\"col-lg-4\">{input}</div>\n<div class=\"col-lg-6\">{error}</div>", |
24 | - 'labelOptions' => ['class' => 'col-lg-2 control-label'], |
|
24 | + 'labelOptions' => [ 'class' => 'col-lg-2 control-label' ], |
|
25 | 25 | ], |
26 | 26 | ]); ?> |
27 | 27 | |
28 | - <?php echo $form->field($model, 'first_name')->textInput(['autofocus' => true])->label(Yii::t('site', 'Name')) ?> |
|
28 | + <?php echo $form->field($model, 'first_name')->textInput([ 'autofocus' => true ])->label(Yii::t('site', 'Name')) ?> |
|
29 | 29 | |
30 | 30 | <?php echo $form->field($model, 'email')->textInput()->label(Yii::t('site', 'Email')) ?> |
31 | 31 | |
@@ -36,14 +36,14 @@ discard block |
||
36 | 36 | <?php echo $form->field($model, 'passwordRepeat')->passwordInput()->label(Yii::t('site', 'Password repeat')) ?> |
37 | 37 | |
38 | 38 | <?php echo $form->field($model, 'verifyCode')->widget(Captcha::class, [ |
39 | - 'captchaAction' => '/'.$this->params['shortLanguage'].'/site/captcha', |
|
39 | + 'captchaAction' => '/'.$this->params[ 'shortLanguage' ].'/site/captcha', |
|
40 | 40 | 'template' => '<div class="row"><div class="col-lg-7">{image}</div></div> |
41 | 41 | <div class="row"><div class="col-lg-12">{input}</div></div>', |
42 | 42 | ])->label(Yii::t('feedback', 'Verify code')) ?> |
43 | 43 | |
44 | 44 | <div class="form-group"> |
45 | 45 | <div class="col-lg-offset-1 col-lg-5"> |
46 | - <?php echo Html::submitButton(Yii::t('app', 'Send'), ['class' => 'btn btn-primary', 'name' => 'register-button']) ?> |
|
46 | + <?php echo Html::submitButton(Yii::t('app', 'Send'), [ 'class' => 'btn btn-primary', 'name' => 'register-button' ]) ?> |
|
47 | 47 | </div> |
48 | 48 | <div class="col-lg-6"> |
49 | 49 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | use yii\bootstrap\ActiveForm; |
9 | 9 | |
10 | 10 | $this->title = Yii::t('site', 'Sign in'); |
11 | -$this->params['breadcrumbs'][] = $this->title; |
|
11 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
12 | 12 | ?> |
13 | 13 | <section id="login"> |
14 | 14 | <div class="container"> |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | 'layout' => 'horizontal', |
21 | 21 | 'fieldConfig' => [ |
22 | 22 | 'template' => "{label}\n<div class=\"col-lg-4\">{input}</div>\n<div class=\"col-lg-6\">{error}</div>", |
23 | - 'labelOptions' => ['class' => 'col-lg-2 control-label'], |
|
23 | + 'labelOptions' => [ 'class' => 'col-lg-2 control-label' ], |
|
24 | 24 | ], |
25 | 25 | ]); ?> |
26 | 26 | |
27 | - <?php echo $form->field($model, 'login')->textInput(['autofocus' => true])->label(Yii::t('site', 'Login')) ?> |
|
27 | + <?php echo $form->field($model, 'login')->textInput([ 'autofocus' => true ])->label(Yii::t('site', 'Login')) ?> |
|
28 | 28 | |
29 | 29 | <?php echo $form->field($model, 'password')->passwordInput()->label(Yii::t('site', 'Password')) ?> |
30 | 30 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | <div class="form-group"> |
36 | 36 | <div class="col-lg-offset-1 col-lg-5"> |
37 | - <?php echo Html::submitButton(Yii::t('app', 'Send'), ['class' => 'btn btn-primary', 'name' => 'login-button']) ?> |
|
37 | + <?php echo Html::submitButton(Yii::t('app', 'Send'), [ 'class' => 'btn btn-primary', 'name' => 'login-button' ]) ?> |
|
38 | 38 | </div> |
39 | 39 | <div class="col-lg-6"> |
40 | 40 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | /* @var $this yii\web\View */ |
4 | 4 | |
5 | 5 | $this->title = Yii::t('site', 'Register'); |
6 | -$this->params['breadcrumbs'][] = $this->title; |
|
6 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
7 | 7 | ?> |
8 | 8 | <div class="container"> |
9 | 9 | <div class="row"> |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | |
18 | 18 | if (!isset($frameworkPath)) { |
19 | 19 | $searchPaths = [ |
20 | - dirname(__FILE__) . '/vendor/yiisoft/yii2', |
|
21 | - dirname(__FILE__) . '/../vendor/yiisoft/yii2', |
|
20 | + dirname(__FILE__).'/vendor/yiisoft/yii2', |
|
21 | + dirname(__FILE__).'/../vendor/yiisoft/yii2', |
|
22 | 22 | ]; |
23 | - foreach($searchPaths as $path) { |
|
23 | + foreach ($searchPaths as $path) { |
|
24 | 24 | if (is_dir($path)) { |
25 | 25 | $frameworkPath = $path; |
26 | 26 | break; |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | if (!isset($frameworkPath) || !is_dir($frameworkPath)) { |
32 | 32 | $message = "<h1>Error</h1>\n\n" |
33 | 33 | . "<p><strong>The path to yii framework seems to be incorrect.</strong></p>\n" |
34 | - . '<p>You need to install Yii framework via composer or adjust the framework path in file <abbr title="' . __FILE__ . '">' . basename(__FILE__) . "</abbr>.</p>\n" |
|
35 | - . '<p>Please refer to the <abbr title="' . dirname(__FILE__) . "/README.md\">README</abbr> on how to install Yii.</p>\n"; |
|
34 | + . '<p>You need to install Yii framework via composer or adjust the framework path in file <abbr title="'.__FILE__.'">'.basename(__FILE__)."</abbr>.</p>\n" |
|
35 | + . '<p>Please refer to the <abbr title="'.dirname(__FILE__)."/README.md\">README</abbr> on how to install Yii.</p>\n"; |
|
36 | 36 | |
37 | - if (!empty($_SERVER['argv'])) { |
|
37 | + if (!empty($_SERVER[ 'argv' ])) { |
|
38 | 38 | // do not print HTML when used in console mode |
39 | 39 | echo strip_tags($message); |
40 | 40 | } else { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | exit(1); |
44 | 44 | } |
45 | 45 | |
46 | -require_once($frameworkPath . '/requirements/YiiRequirementChecker.php'); |
|
46 | +require_once($frameworkPath.'/requirements/YiiRequirementChecker.php'); |
|
47 | 47 | $requirementsChecker = new YiiRequirementChecker(); |
48 | 48 | |
49 | 49 | $gdMemo = $imagickMemo = 'Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.'; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | if (extension_loaded('gd')) { |
63 | 63 | $gdInfo = gd_info(); |
64 | - if (!empty($gdInfo['FreeType Support'])) { |
|
64 | + if (!empty($gdInfo[ 'FreeType Support' ])) { |
|
65 | 65 | $gdOK = true; |
66 | 66 | } else { |
67 | 67 | $gdMemo = 'GD extension should be installed with FreeType support in order to be used for image CAPTCHA.'; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | // OPcache check |
151 | 151 | if (!version_compare(phpversion(), '5.5', '>=')) { |
152 | - $requirements[] = array( |
|
152 | + $requirements[ ] = array( |
|
153 | 153 | 'name' => 'APC extension', |
154 | 154 | 'mandatory' => false, |
155 | 155 | 'condition' => extension_loaded('apc'), |