@@ -10,21 +10,21 @@ discard block |
||
10 | 10 | /* @var $this Itstructure\AdminModule\components\AdminView */ |
11 | 11 | |
12 | 12 | $this->title = Yii::t('products', 'Products'); |
13 | -$this->params['breadcrumbs'][] = $this->title; |
|
13 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
14 | 14 | ?> |
15 | 15 | <div class="product-index"> |
16 | 16 | |
17 | - <?php echo $this->render('_search', ['model' => $searchModel]); ?> |
|
17 | + <?php echo $this->render('_search', [ 'model' => $searchModel ]); ?> |
|
18 | 18 | |
19 | 19 | <p> |
20 | 20 | <?php echo Html::a(Yii::t('products', 'Create product'), [ |
21 | - $this->params['urlPrefix'].'create' |
|
21 | + $this->params[ 'urlPrefix' ].'create' |
|
22 | 22 | ], [ |
23 | 23 | 'class' => 'btn btn-success' |
24 | 24 | ]) ?> |
25 | 25 | </p> |
26 | 26 | |
27 | - <?php echo LinkPager::widget(['pagination' => $dataProvider->getPagination()]) ?> |
|
27 | + <?php echo LinkPager::widget([ 'pagination' => $dataProvider->getPagination() ]) ?> |
|
28 | 28 | |
29 | 29 | <?php echo GridView::widget([ |
30 | 30 | 'dataProvider' => $dataProvider, |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | 'value' => function($searchModel) { |
38 | 38 | /* @var $searchModel ProductSearch */ |
39 | 39 | return Html::a( |
40 | - Html::tag('i', '', ['class' => empty($searchModel->icon) ? 'fa fa-file fa-2x' : $searchModel->icon]), |
|
41 | - Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id]) |
|
40 | + Html::tag('i', '', [ 'class' => empty($searchModel->icon) ? 'fa fa-file fa-2x' : $searchModel->icon ]), |
|
41 | + Url::to([ $this->params[ 'urlPrefix' ].'view', 'id' => $searchModel->id ]) |
|
42 | 42 | ); |
43 | 43 | }, |
44 | 44 | 'format' => 'raw', |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /* @var $searchModel ProductSearch */ |
50 | 50 | return Html::a( |
51 | 51 | Html::encode($searchModel->getDefaultTranslate('title')), |
52 | - Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id]) |
|
52 | + Url::to([ $this->params[ 'urlPrefix' ].'view', 'id' => $searchModel->id ]) |
|
53 | 53 | ); |
54 | 54 | }, |
55 | 55 | 'format' => 'raw', |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | ], |
65 | 65 | 'page' => [ |
66 | 66 | 'label' => Yii::t('products', 'Parent page'), |
67 | - 'value' => function ($searchModel) { |
|
67 | + 'value' => function($searchModel) { |
|
68 | 68 | /* @var $searchModel app\models\ProductSearch */ |
69 | 69 | return null === $searchModel->page ? '' : Html::a( |
70 | 70 | $searchModel->page->getDefaultTranslate('title'), |
71 | - Url::to(['/'.$this->params['shortLanguage'].'/admin/pages/view', 'id' => $searchModel->page->id]), |
|
71 | + Url::to([ '/'.$this->params[ 'shortLanguage' ].'/admin/pages/view', 'id' => $searchModel->page->id ]), |
|
72 | 72 | [ |
73 | 73 | 'target' => '_blank' |
74 | 74 | ] |
@@ -78,22 +78,22 @@ discard block |
||
78 | 78 | ], |
79 | 79 | [ |
80 | 80 | 'attribute' => 'created_at', |
81 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
81 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
82 | 82 | 'label' => Yii::t('app', 'Created date'), |
83 | 83 | ], |
84 | 84 | [ |
85 | 85 | 'attribute' => 'updated_at', |
86 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
86 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
87 | 87 | 'label' => Yii::t('app', 'Updated date'), |
88 | 88 | ], |
89 | 89 | 'active' => [ |
90 | 90 | 'label' => Yii::t('app', 'Active status'), |
91 | 91 | 'value' => function($searchModel) { |
92 | 92 | /* @var $searchModel app\models\Product */ |
93 | - if ($searchModel->active == 1){ |
|
94 | - return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>'; |
|
93 | + if ($searchModel->active == 1) { |
|
94 | + return '<i class="fa fa-check-circle text-success"> '.Yii::t('app', 'Active').'</i>'; |
|
95 | 95 | } else { |
96 | - return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>'; |
|
96 | + return '<i class="fa fa-times text-danger"> '.Yii::t('app', 'Inactive').'</i>'; |
|
97 | 97 | } |
98 | 98 | }, |
99 | 99 | 'format' => 'raw', |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | 'class' => 'yii\grid\ActionColumn', |
103 | 103 | 'header' => Yii::t('app', 'Actions'), |
104 | 104 | 'template' => '{view} {update} {delete}', |
105 | - 'urlCreator'=>function($action, $model, $key, $index){ |
|
105 | + 'urlCreator'=>function($action, $model, $key, $index) { |
|
106 | 106 | return Url::to([ |
107 | - $this->params['urlPrefix'].$action, |
|
107 | + $this->params[ 'urlPrefix' ].$action, |
|
108 | 108 | 'id' => $model->id |
109 | 109 | ]); |
110 | 110 | } |
@@ -9,13 +9,13 @@ discard block |
||
9 | 9 | /* @var $model app\models\Product */ |
10 | 10 | |
11 | 11 | $this->title = $model->getDefaultTranslate('title'); |
12 | -$this->params['breadcrumbs'][] = [ |
|
12 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
13 | 13 | 'label' => Yii::t('products', 'Products'), |
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,7 +83,7 @@ discard block |
||
83 | 83 | 'label' => Yii::t('app', 'Icon'), |
84 | 84 | 'value' => function($model) { |
85 | 85 | /* @var $model app\models\Product */ |
86 | - return Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]); |
|
86 | + return Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]); |
|
87 | 87 | }, |
88 | 88 | 'format' => 'raw', |
89 | 89 | ], |
@@ -91,21 +91,21 @@ discard block |
||
91 | 91 | 'label' => Yii::t('app', 'Active status'), |
92 | 92 | 'value' => function($model) { |
93 | 93 | /* @var $model app\models\Product */ |
94 | - if ($model->active == 1){ |
|
95 | - return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>'; |
|
94 | + if ($model->active == 1) { |
|
95 | + return '<i class="fa fa-check-circle text-success"> '.Yii::t('app', 'Active').'</i>'; |
|
96 | 96 | } else { |
97 | - return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>'; |
|
97 | + return '<i class="fa fa-times text-danger"> '.Yii::t('app', 'Inactive').'</i>'; |
|
98 | 98 | } |
99 | 99 | }, |
100 | 100 | 'format' => 'raw', |
101 | 101 | ], |
102 | 102 | [ |
103 | 103 | 'label' => Yii::t('products', 'Parent page'), |
104 | - 'value' => function ($model) { |
|
104 | + 'value' => function($model) { |
|
105 | 105 | /* @var $model app\models\Product */ |
106 | 106 | return null === $model->page ? '' : Html::a( |
107 | 107 | $model->page->getDefaultTranslate('title'), |
108 | - Url::to(['/'.$this->params['shortLanguage'].'/admin/pages/view', 'id' => $model->page->id]), |
|
108 | + Url::to([ '/'.$this->params[ 'shortLanguage' ].'/admin/pages/view', 'id' => $model->page->id ]), |
|
109 | 109 | [ |
110 | 110 | 'target' => '_blank' |
111 | 111 | ] |
@@ -115,12 +115,12 @@ discard block |
||
115 | 115 | ], |
116 | 116 | [ |
117 | 117 | 'attribute' => 'created_at', |
118 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
118 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
119 | 119 | 'label' => Yii::t('app', 'Created date'), |
120 | 120 | ], |
121 | 121 | [ |
122 | 122 | 'attribute' => 'updated_at', |
123 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
123 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
124 | 124 | 'label' => Yii::t('app', 'Updated date'), |
125 | 125 | ], |
126 | 126 | ], |
@@ -9,4 +9,4 @@ |
||
9 | 9 | 'name' => Html::getInputName($model, 'pageId'), |
10 | 10 | 'label' => Html::encode($data->getDefaultTranslate('title')), |
11 | 11 | 'uncheck' => false, |
12 | -]); ?> |
|
12 | +]); ?> |
@@ -5,13 +5,13 @@ |
||
5 | 5 | /* @var $pages array|\yii\db\ActiveRecord[] */ |
6 | 6 | |
7 | 7 | $this->title = Yii::t('products', 'Create product'); |
8 | -$this->params['breadcrumbs'][] = [ |
|
8 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
9 | 9 | 'label' => Yii::t('products', 'Products'), |
10 | 10 | 'url' => [ |
11 | - $this->params['urlPrefix'].'index' |
|
11 | + $this->params[ 'urlPrefix' ].'index' |
|
12 | 12 | ] |
13 | 13 | ]; |
14 | -$this->params['breadcrumbs'][] = Yii::t('app', 'Create'); |
|
14 | +$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Create'); |
|
15 | 15 | ?> |
16 | 16 | <div class="product-create"> |
17 | 17 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | /* @var $roles yii\rbac\Role[] */ |
10 | 10 | |
11 | 11 | $this->title = Yii::t('settings', 'Settings'); |
12 | -$this->params['breadcrumbs'][] = $this->title; |
|
12 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
13 | 13 | ?> |
14 | 14 | <div class="settings-index"> |
15 | 15 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | <div class="form-group"> |
43 | 43 | <?php echo Html::submitButton(Yii::t('app', 'Update'), |
44 | - ['class' => 'btn btn-success']) ?> |
|
44 | + [ 'class' => 'btn btn-success' ]) ?> |
|
45 | 45 | </div> |
46 | 46 | |
47 | 47 | <?php ActiveForm::end(); ?> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | 'filebrowserWindowWidth' => '1000', |
38 | 38 | 'filebrowserWindowHeight' => '300', |
39 | 39 | 'allowedContent' => true, |
40 | - 'language' => $this->params['shortLanguage'], |
|
40 | + 'language' => $this->params[ 'shortLanguage' ], |
|
41 | 41 | ] |
42 | 42 | ], |
43 | 43 | [ |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'filebrowserWindowWidth' => '1000', |
54 | 54 | 'filebrowserWindowHeight' => '700', |
55 | 55 | 'allowedContent' => true, |
56 | - 'language' => $this->params['shortLanguage'], |
|
56 | + 'language' => $this->params[ 'shortLanguage' ], |
|
57 | 57 | ] |
58 | 58 | ], |
59 | 59 | [ |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | 'languageModel' => new Language() |
73 | 73 | ]) ?> |
74 | 74 | |
75 | - <?php echo $form->field($model, 'default')->checkbox(['value' => 1, 'label' => Yii::t('app', 'Set as default')]) ?> |
|
75 | + <?php echo $form->field($model, 'default')->checkbox([ 'value' => 1, 'label' => Yii::t('app', 'Set as default') ]) ?> |
|
76 | 76 | |
77 | 77 | </div> |
78 | 78 | </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('about', 'Update about').': ' . $model->mainModel->getDefaultTranslate('title'); |
|
7 | -$this->params['breadcrumbs'][] = [ |
|
6 | +$this->title = Yii::t('about', 'Update about').': '.$model->mainModel->getDefaultTranslate('title'); |
|
7 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
8 | 8 | 'label' => Yii::t('about', 'About'), |
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="about-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('about', 'About'); |
12 | -$this->params['breadcrumbs'][] = $this->title; |
|
12 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
13 | 13 | ?> |
14 | 14 | <div class="about-index"> |
15 | 15 | |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | <p> |
19 | 19 | <?php echo Html::a(Yii::t('about', 'Create about'), [ |
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 AboutSearch */ |
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 | 'aboutId' => $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\About */ |
10 | 10 | |
11 | 11 | $this->title = $model->getDefaultTranslate('title'); |
12 | -$this->params['breadcrumbs'][] = [ |
|
12 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
13 | 13 | 'label' => Yii::t('about', 'About'), |
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,13 +29,13 @@ discard block |
||
29 | 29 | |
30 | 30 | <p> |
31 | 31 | <?php echo Html::a(Yii::t('app', 'Update'), [ |
32 | - $this->params['urlPrefix'].'update', 'id' => $model->id |
|
32 | + $this->params[ 'urlPrefix' ].'update', 'id' => $model->id |
|
33 | 33 | ], [ |
34 | 34 | 'class' => 'btn btn-primary' |
35 | 35 | ]) ?> |
36 | 36 | |
37 | 37 | <?php echo Html::a(Yii::t('app', 'Delete'), [ |
38 | - $this->params['urlPrefix'].'delete', |
|
38 | + $this->params[ 'urlPrefix' ].'delete', |
|
39 | 39 | 'id' => $model->id |
40 | 40 | ], [ |
41 | 41 | 'class' => 'btn btn-danger', |
@@ -82,22 +82,22 @@ discard block |
||
82 | 82 | 'label' => Yii::t('app', 'Default status'), |
83 | 83 | 'value' => function($model) { |
84 | 84 | /* @var $model app\models\About */ |
85 | - if ($model->default == 1){ |
|
86 | - return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Default') . '</i>'; |
|
85 | + if ($model->default == 1) { |
|
86 | + return '<i class="fa fa-check-circle text-success"> '.Yii::t('app', 'Default').'</i>'; |
|
87 | 87 | } else { |
88 | - return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'No') . '</i>'; |
|
88 | + return '<i class="fa fa-times text-danger"> '.Yii::t('app', 'No').'</i>'; |
|
89 | 89 | } |
90 | 90 | }, |
91 | 91 | 'format' => 'raw', |
92 | 92 | ], |
93 | 93 | [ |
94 | 94 | 'attribute' => 'created_at', |
95 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
95 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
96 | 96 | 'label' => Yii::t('app', 'Created date'), |
97 | 97 | ], |
98 | 98 | [ |
99 | 99 | 'attribute' => 'updated_at', |
100 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
100 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
101 | 101 | 'label' => Yii::t('app', 'Updated date'), |
102 | 102 | ], |
103 | 103 | ], |