@@ -4,13 +4,13 @@ |
||
4 | 4 | /* @var $model app\models\Contact */ |
5 | 5 | |
6 | 6 | $this->title = Yii::t('contacts', 'Create contact'); |
7 | -$this->params['breadcrumbs'][] = [ |
|
7 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
8 | 8 | 'label' => Yii::t('contacts', 'Contacts'), |
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="contact-create"> |
16 | 16 |
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | /* @var $model Product */ |
13 | 13 | |
14 | 14 | $this->title = $model->title; |
15 | -$this->params['breadcrumbs'][] = [ |
|
15 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
16 | 16 | 'label' => Yii::t('products', 'Products'), |
17 | 17 | 'url' => [ |
18 | - $this->params['urlPrefix'].'index' |
|
18 | + $this->params[ 'urlPrefix' ] . 'index' |
|
19 | 19 | ] |
20 | 20 | ]; |
21 | -$this->params['breadcrumbs'][] = $this->title; |
|
21 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
22 | 22 | ?> |
23 | 23 | |
24 | 24 | <style> |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | |
33 | 33 | <p> |
34 | 34 | <?php echo Html::a(Yii::t('app', 'Update'), [ |
35 | - $this->params['urlPrefix'].'update', |
|
35 | + $this->params[ 'urlPrefix' ] . 'update', |
|
36 | 36 | 'id' => $model->id |
37 | 37 | ], [ |
38 | 38 | 'class' => 'btn btn-primary' |
39 | 39 | ]) ?> |
40 | 40 | |
41 | 41 | <?php echo Html::a(Yii::t('app', 'Delete'), [ |
42 | - $this->params['urlPrefix'].'delete', |
|
42 | + $this->params[ 'urlPrefix' ] . 'delete', |
|
43 | 43 | 'id' => $model->id |
44 | 44 | ], [ |
45 | 45 | 'class' => 'btn btn-danger', |
@@ -78,13 +78,13 @@ discard block |
||
78 | 78 | 'label' => Yii::t('app', 'Icon'), |
79 | 79 | 'value' => function($model) { |
80 | 80 | /* @var $model Product */ |
81 | - return Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]); |
|
81 | + return Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]); |
|
82 | 82 | }, |
83 | 83 | 'format' => 'raw', |
84 | 84 | ], |
85 | 85 | 'thumbnail' => [ |
86 | 86 | 'label' => MFUModule::t('main', 'Thumbnail'), |
87 | - 'value' => function ($model) { |
|
87 | + 'value' => function($model) { |
|
88 | 88 | /* @var $model Product */ |
89 | 89 | $thumbnailModel = $model->getThumbnailModel(); |
90 | 90 | return $thumbnailModel == null ? '' : Html::a($model->getDefaultThumbImage(), Url::to($thumbnailModel->getThumbUrl(MFUModule::THUMB_ALIAS_LARGE)), [ |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | 'label' => Yii::t('app', 'Active status'), |
98 | 98 | 'value' => function($model) { |
99 | 99 | /* @var $model Product */ |
100 | - if ($model->active == 1){ |
|
100 | + if ($model->active == 1) { |
|
101 | 101 | return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>'; |
102 | 102 | } else { |
103 | 103 | return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>'; |
@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | ], |
108 | 108 | [ |
109 | 109 | 'label' => Yii::t('products', 'Parent page'), |
110 | - 'value' => function ($model) { |
|
110 | + 'value' => function($model) { |
|
111 | 111 | /* @var $model Product */ |
112 | 112 | return null === $model->page ? '' : Html::a( |
113 | 113 | $model->page->title, |
114 | - Url::to(['/admin/pages/view', 'id' => $model->page->id]), |
|
114 | + Url::to([ '/admin/pages/view', 'id' => $model->page->id ]), |
|
115 | 115 | [ |
116 | 116 | 'target' => '_blank' |
117 | 117 | ] |
@@ -121,12 +121,12 @@ discard block |
||
121 | 121 | ], |
122 | 122 | [ |
123 | 123 | 'attribute' => 'created_at', |
124 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
124 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
125 | 125 | 'label' => Yii::t('app', 'Created date'), |
126 | 126 | ], |
127 | 127 | [ |
128 | 128 | 'attribute' => 'updated_at', |
129 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
129 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
130 | 130 | 'label' => Yii::t('app', 'Updated date'), |
131 | 131 | ], |
132 | 132 | ], |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | return Html::a( |
146 | 146 | $item->getDefaultThumbImage(), |
147 | 147 | Url::to([ |
148 | - '/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
148 | + '/mfuploader/' . $item->getFileType($item->type) . '-album/view', 'id' => $item->id |
|
149 | 149 | ]) |
150 | 150 | ); |
151 | 151 | }, |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | return Html::a( |
159 | 159 | Html::encode($item->title), |
160 | 160 | Url::to([ |
161 | - '/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
161 | + '/mfuploader/' . $item->getFileType($item->type) . '-album/view', 'id' => $item->id |
|
162 | 162 | ]) |
163 | 163 | ); |
164 | 164 | }, |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | <?php $form = ActiveForm::begin([ |
30 | 30 | 'action' => [ |
31 | - $this->params['urlPrefix'].'index' |
|
31 | + $this->params[ 'urlPrefix' ] . 'index' |
|
32 | 32 | ], |
33 | 33 | 'method' => 'get', |
34 | 34 | ]); ?> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | <div class="col-md-4"> |
38 | 38 | |
39 | 39 | <?php echo $form->field($model, 'active') |
40 | - ->radioList([1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive')]) |
|
40 | + ->radioList([ 1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive') ]) |
|
41 | 41 | ->label(Yii::t('app', 'Active status')); ?> |
42 | 42 | |
43 | 43 | <?php echo Html::label(Yii::t('products', 'Parent page'), 'search-by-page', [ |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | ], |
53 | 53 | 'mainContainerOptions' => [ |
54 | 54 | 'levels' => [ |
55 | - ['style' => 'margin-left: 0; padding-left: 0;'], |
|
56 | - ['style' => 'margin-left: 10px; padding-left: 10px;'], |
|
55 | + [ 'style' => 'margin-left: 0; padding-left: 0;' ], |
|
56 | + [ 'style' => 'margin-left: 10px; padding-left: 10px;' ], |
|
57 | 57 | ] |
58 | 58 | ], |
59 | 59 | 'itemContainerOptions' => [ |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | <?php echo $form->field($model, 'title')->label(Yii::t('app', 'Title')) ?> |
65 | 65 | |
66 | 66 | <div class="form-group"> |
67 | - <?php echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?> |
|
68 | - <?php echo Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default', 'role' => 'clear-button']) ?> |
|
67 | + <?php echo Html::submitButton(Yii::t('app', 'Search'), [ 'class' => 'btn btn-primary' ]) ?> |
|
68 | + <?php echo Html::resetButton(Yii::t('app', 'Reset'), [ 'class' => 'btn btn-default', 'role' => 'clear-button' ]) ?> |
|
69 | 69 | </div> |
70 | 70 | |
71 | 71 | </div> |
@@ -9,4 +9,4 @@ |
||
9 | 9 | 'name' => Html::getInputName($model, 'pageId'), |
10 | 10 | 'label' => Html::encode($data->title), |
11 | 11 | 'uncheck' => false, |
12 | -]); ?> |
|
12 | +]); ?> |
@@ -11,4 +11,4 @@ |
||
11 | 11 | 'uncheck' => false, |
12 | 12 | 'onMouseDown' => 'this.isChecked=this.checked;', |
13 | 13 | 'onClick' => 'this.checked=!this.isChecked;', |
14 | -]); ?> |
|
14 | +]); ?> |
@@ -9,21 +9,21 @@ |
||
9 | 9 | /* @var $images Mediafile[] */ |
10 | 10 | /* @var $media_pages Pagination */ |
11 | 11 | |
12 | -$this->title = Yii::t('products', 'Update product').': ' . $model->title; |
|
13 | -$this->params['breadcrumbs'][] = [ |
|
12 | +$this->title = Yii::t('products', 'Update product') . ': ' . $model->title; |
|
13 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
14 | 14 | 'label' => Yii::t('products', 'Products'), |
15 | 15 | 'url' => [ |
16 | - $this->params['urlPrefix'].'index' |
|
16 | + $this->params[ 'urlPrefix' ] . 'index' |
|
17 | 17 | ] |
18 | 18 | ]; |
19 | -$this->params['breadcrumbs'][] = [ |
|
19 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
20 | 20 | 'label' => $model->title, |
21 | 21 | 'url' => [ |
22 | - $this->params['urlPrefix'].'view', |
|
22 | + $this->params[ 'urlPrefix' ] . 'view', |
|
23 | 23 | 'id' => $model->id |
24 | 24 | ] |
25 | 25 | ]; |
26 | -$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); |
|
26 | +$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update'); |
|
27 | 27 | ?> |
28 | 28 | <div class="product-update"> |
29 | 29 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | 'filebrowserWindowHeight' => '700', |
57 | 57 | 'extraPlugins' => 'pbckcode', |
58 | 58 | 'toolbarGroups' => [ |
59 | - ['name' => 'pbckcode'] |
|
59 | + [ 'name' => 'pbckcode' ] |
|
60 | 60 | ], |
61 | 61 | 'allowedContent' => true, |
62 | 62 | 'language' => Yii::$app->language, |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | ])->label(Yii::t('app', 'Icon html class')); ?> |
84 | 84 | <div class="row" style="margin-bottom: 15px;"> |
85 | 85 | <div class="col-md-12"> |
86 | - <?php if(!$model->isNewRecord): ?> |
|
87 | - <?php echo Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]) ?> |
|
86 | + <?php if (!$model->isNewRecord): ?> |
|
87 | + <?php echo Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]) ?> |
|
88 | 88 | <?php endif; ?> |
89 | 89 | <?php echo Html::a('Fontawesome icons', Url::to('https://fontawesome.ru/all-icons/'), [ |
90 | 90 | 'target' => '_blank' |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | <?php |
93 | 93 | Modal::begin([ |
94 | 94 | 'header' => '<h2>Fe icons</h2>', |
95 | - 'toggleButton' => ['label' => 'Fe icons'] |
|
95 | + 'toggleButton' => [ 'label' => 'Fe icons' ] |
|
96 | 96 | ]); |
97 | - require __DIR__.'/../icons/fe-icons.php'; |
|
97 | + require __DIR__ . '/../icons/fe-icons.php'; |
|
98 | 98 | Modal::end(); |
99 | 99 | ?> |
100 | 100 | </div> |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | <!-- Thumbnail end --> |
113 | 113 | |
114 | 114 | <?php echo $form->field($model, 'active') |
115 | - ->radioList([1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive')]) |
|
115 | + ->radioList([ 1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive') ]) |
|
116 | 116 | ->label(Yii::t('app', 'Active status')); ?> |
117 | 117 | |
118 | 118 | <div class="form-group <?php if ($model->hasErrors('pageId')):?>has-error<?php endif; ?>"> |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | ], |
129 | 129 | 'mainContainerOptions' => [ |
130 | 130 | 'levels' => [ |
131 | - ['style' => 'margin-left: 0; padding-left: 0;'], |
|
132 | - ['style' => 'margin-left: 10px; padding-left: 10px;'], |
|
131 | + [ 'style' => 'margin-left: 0; padding-left: 0;' ], |
|
132 | + [ 'style' => 'margin-left: 10px; padding-left: 10px;' ], |
|
133 | 133 | ] |
134 | 134 | ], |
135 | 135 | 'itemContainerOptions' => [ |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | <div class="row"> |
161 | 161 | <div class="col-md-12"> |
162 | 162 | <h5><?php echo MFUModule::t('main', 'New files'); ?></h5> |
163 | - <?php for ($i=1; $i < 5; $i++): ?> |
|
163 | + <?php for ($i = 1; $i < 5; $i++): ?> |
|
164 | 164 | <?php echo $this->render('../mediafiles/_new-mediafiles', [ |
165 | 165 | 'model' => $model, |
166 | 166 | 'fileType' => UploadModelInterface::FILE_TYPE_IMAGE, |
@@ -11,21 +11,21 @@ discard block |
||
11 | 11 | /* @var $this Itstructure\AdminModule\components\AdminView */ |
12 | 12 | |
13 | 13 | $this->title = Yii::t('products', 'Products'); |
14 | -$this->params['breadcrumbs'][] = $this->title; |
|
14 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
15 | 15 | ?> |
16 | 16 | <div class="product-index"> |
17 | 17 | |
18 | - <?php echo $this->render('_search', ['model' => $searchModel]); ?> |
|
18 | + <?php echo $this->render('_search', [ 'model' => $searchModel ]); ?> |
|
19 | 19 | |
20 | 20 | <p> |
21 | 21 | <?php echo Html::a(Yii::t('products', 'Create product'), [ |
22 | - $this->params['urlPrefix'].'create' |
|
22 | + $this->params[ 'urlPrefix' ] . 'create' |
|
23 | 23 | ], [ |
24 | 24 | 'class' => 'btn btn-success' |
25 | 25 | ]) ?> |
26 | 26 | </p> |
27 | 27 | |
28 | - <?php echo LinkPager::widget(['pagination' => $dataProvider->getPagination()]) ?> |
|
28 | + <?php echo LinkPager::widget([ 'pagination' => $dataProvider->getPagination() ]) ?> |
|
29 | 29 | |
30 | 30 | <?php echo GridView::widget([ |
31 | 31 | 'dataProvider' => $dataProvider, |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | 'value' => function($searchModel) { |
39 | 39 | /* @var $searchModel ProductSearch */ |
40 | 40 | return Html::a( |
41 | - Html::tag('i', '', ['class' => empty($searchModel->icon) ? 'fa fa-file fa-2x' : $searchModel->icon]), |
|
42 | - Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id]) |
|
41 | + Html::tag('i', '', [ 'class' => empty($searchModel->icon) ? 'fa fa-file fa-2x' : $searchModel->icon ]), |
|
42 | + Url::to([ $this->params[ 'urlPrefix' ] . 'view', 'id' => $searchModel->id ]) |
|
43 | 43 | ); |
44 | 44 | }, |
45 | 45 | 'format' => 'raw', |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /* @var $data ProductSearch */ |
51 | 51 | $defaultThumbImage = $data->getDefaultThumbImage(); |
52 | 52 | return !empty($defaultThumbImage) ? Html::a($defaultThumbImage, Url::to([ |
53 | - $this->params['urlPrefix'].'view', |
|
53 | + $this->params[ 'urlPrefix' ] . 'view', |
|
54 | 54 | 'id' => $data->id |
55 | 55 | ])) : ''; |
56 | 56 | }, |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /* @var $searchModel ProductSearch */ |
63 | 63 | return Html::a( |
64 | 64 | Html::encode($searchModel->title), |
65 | - Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id]) |
|
65 | + Url::to([ $this->params[ 'urlPrefix' ] . 'view', 'id' => $searchModel->id ]) |
|
66 | 66 | ); |
67 | 67 | }, |
68 | 68 | 'format' => 'raw', |
@@ -77,11 +77,11 @@ discard block |
||
77 | 77 | ], |
78 | 78 | 'page' => [ |
79 | 79 | 'label' => Yii::t('products', 'Parent page'), |
80 | - 'value' => function ($searchModel) { |
|
80 | + 'value' => function($searchModel) { |
|
81 | 81 | /* @var $searchModel app\models\ProductSearch */ |
82 | 82 | return null === $searchModel->page ? '' : Html::a( |
83 | 83 | $searchModel->page->title, |
84 | - Url::to(['/admin/pages/view', 'id' => $searchModel->page->id]), |
|
84 | + Url::to([ '/admin/pages/view', 'id' => $searchModel->page->id ]), |
|
85 | 85 | [ |
86 | 86 | 'target' => '_blank' |
87 | 87 | ] |
@@ -91,19 +91,19 @@ discard block |
||
91 | 91 | ], |
92 | 92 | [ |
93 | 93 | 'attribute' => 'created_at', |
94 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
94 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
95 | 95 | 'label' => Yii::t('app', 'Created date'), |
96 | 96 | ], |
97 | 97 | [ |
98 | 98 | 'attribute' => 'updated_at', |
99 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
99 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
100 | 100 | 'label' => Yii::t('app', 'Updated date'), |
101 | 101 | ], |
102 | 102 | 'active' => [ |
103 | 103 | 'label' => Yii::t('app', 'Active status'), |
104 | 104 | 'value' => function($searchModel) { |
105 | 105 | /* @var $searchModel app\models\Product */ |
106 | - if ($searchModel->active == 1){ |
|
106 | + if ($searchModel->active == 1) { |
|
107 | 107 | return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>'; |
108 | 108 | } else { |
109 | 109 | return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>'; |
@@ -115,9 +115,9 @@ discard block |
||
115 | 115 | 'class' => 'yii\grid\ActionColumn', |
116 | 116 | 'header' => Yii::t('app', 'Actions'), |
117 | 117 | 'template' => '{view} {update} {delete}', |
118 | - 'urlCreator'=>function($action, $model, $key, $index){ |
|
118 | + 'urlCreator'=>function($action, $model, $key, $index) { |
|
119 | 119 | return Url::to([ |
120 | - $this->params['urlPrefix'].$action, |
|
120 | + $this->params[ 'urlPrefix' ] . $action, |
|
121 | 121 | 'id' => $model->id |
122 | 122 | ]); |
123 | 123 | } |
@@ -6,13 +6,13 @@ |
||
6 | 6 | /* @var $albums Itstructure\MFUploader\models\album\Album[] */ |
7 | 7 | |
8 | 8 | $this->title = Yii::t('products', 'Create product'); |
9 | -$this->params['breadcrumbs'][] = [ |
|
9 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
10 | 10 | 'label' => Yii::t('products', 'Products'), |
11 | 11 | 'url' => [ |
12 | - $this->params['urlPrefix'].'index' |
|
12 | + $this->params[ 'urlPrefix' ] . 'index' |
|
13 | 13 | ] |
14 | 14 | ]; |
15 | -$this->params['breadcrumbs'][] = Yii::t('app', 'Create'); |
|
15 | +$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Create'); |
|
16 | 16 | ?> |
17 | 17 | <div class="product-create"> |
18 | 18 |