Passed
Push — master ( 1dbcfe...fe7b3f )
by Andrey
03:34
created
views/admin/pages/update.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,21 +4,21 @@
 block discarded – undo
4 4
 /* @var $model Itstructure\AdminModule\models\MultilanguageValidateModel */
5 5
 /* @var $pages array|\yii\db\ActiveRecord[] */
6 6
 
7
-$this->title = Yii::t('pages', 'Update page').': ' . $model->mainModel->getDefaultTranslate('title');
8
-$this->params['breadcrumbs'][] = [
7
+$this->title = Yii::t('pages', 'Update page').': '.$model->mainModel->getDefaultTranslate('title');
8
+$this->params[ 'breadcrumbs' ][ ] = [
9 9
     'label' => Yii::t('pages', 'Pages'),
10 10
     'url' => [
11
-        $this->params['urlPrefix'].'index'
11
+        $this->params[ 'urlPrefix' ].'index'
12 12
     ]
13 13
 ];
14
-$this->params['breadcrumbs'][] = [
14
+$this->params[ 'breadcrumbs' ][ ] = [
15 15
     'label' => $model->mainModel->getDefaultTranslate('title'),
16 16
     'url' => [
17
-        $this->params['urlPrefix'].'view',
17
+        $this->params[ 'urlPrefix' ].'view',
18 18
         'id' => $model->id
19 19
     ]
20 20
 ];
21
-$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
21
+$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update');
22 22
 ?>
23 23
 <div class="page-update">
24 24
 
Please login to merge, or discard this patch.
views/admin/pages/_search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
     <?php $form = ActiveForm::begin([
14 14
         'action' => [
15
-            $this->params['urlPrefix'].'index'
15
+            $this->params[ 'urlPrefix' ].'index'
16 16
         ],
17 17
         'method' => 'get',
18 18
     ]); ?>
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     <?php echo $form->field($model, 'updated_at') ?>
29 29
 
30 30
     <div class="form-group">
31
-        <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
32
-        <?php echo Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
31
+        <?php echo Html::submitButton('Search', [ 'class' => 'btn btn-primary' ]) ?>
32
+        <?php echo Html::resetButton('Reset', [ 'class' => 'btn btn-default' ]) ?>
33 33
     </div>
34 34
 
35 35
     <?php ActiveForm::end(); ?>
Please login to merge, or discard this patch.
views/admin/pages/index.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 /* @var $dataProvider yii\data\ActiveDataProvider */
8 8
 
9 9
 $this->title = Yii::t('pages', 'Pages');
10
-$this->params['breadcrumbs'][] = $this->title;
10
+$this->params[ 'breadcrumbs' ][ ] = $this->title;
11 11
 ?>
12 12
 <div class="page-index">
13 13
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     <p>
17 17
         <?php echo Html::a(Yii::t('pages', 'Create page'), [
18
-            $this->params['urlPrefix'].'create'
18
+            $this->params[ 'urlPrefix' ].'create'
19 19
         ], [
20 20
             'class' => 'btn btn-success'
21 21
         ]) ?>
@@ -25,19 +25,19 @@  discard block
 block discarded – undo
25 25
         'data' => $dataProvider->getModels(),
26 26
         'itemTemplate' => '@app/views/admin/pages/MultiLevelMenu/index.php',
27 27
         'itemTemplateParams' => [
28
-            'urlPrefix' => $this->params['urlPrefix']
28
+            'urlPrefix' => $this->params[ 'urlPrefix' ]
29 29
         ],
30 30
         'mainContainerOptions' => [
31 31
             'levels' => [
32
-                ['class' => 'list-group'],
33
-                ['class' => '']
32
+                [ 'class' => 'list-group' ],
33
+                [ 'class' => '' ]
34 34
             ]
35 35
         ],
36 36
         'itemContainerOptions' => [
37 37
             'levels' => [
38
-                ['class' => 'list-group-item'],
39
-                ['class' => 'list-group-item list-group-item-success'],
40
-                ['class' => 'list-group-item list-group-item-warning'],
38
+                [ 'class' => 'list-group-item' ],
39
+                [ 'class' => 'list-group-item list-group-item-success' ],
40
+                [ 'class' => 'list-group-item list-group-item-warning' ],
41 41
             ]
42 42
         ],
43 43
     ]) ?>
Please login to merge, or discard this patch.
views/admin/pages/view.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 /* @var $albumsDataProvider yii\data\ArrayDataProvider */
12 12
 
13 13
 $this->title = $model->getDefaultTranslate('title');
14
-$this->params['breadcrumbs'][] = [
14
+$this->params[ 'breadcrumbs' ][ ] = [
15 15
     'label' => Yii::t('pages', 'Pages'),
16 16
     'url' => [
17
-        $this->params['urlPrefix'].'index'
17
+        $this->params[ 'urlPrefix' ].'index'
18 18
     ]
19 19
 ];
20
-$this->params['breadcrumbs'][] = $this->title;
20
+$this->params[ 'breadcrumbs' ][ ] = $this->title;
21 21
 ?>
22 22
 
23 23
 <style>
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 
32 32
     <p>
33 33
         <?php echo Html::a(Yii::t('app', 'Update'), [
34
-            $this->params['urlPrefix'].'update',
34
+            $this->params[ 'urlPrefix' ].'update',
35 35
             'id' => $model->id
36 36
         ], [
37 37
             'class' => 'btn btn-primary'
38 38
         ]) ?>
39 39
 
40 40
         <?php echo Html::a(Yii::t('app', 'Delete'), [
41
-            $this->params['urlPrefix'].'delete',
41
+            $this->params[ 'urlPrefix' ].'delete',
42 42
             'id' => $model->id
43 43
         ], [
44 44
             'class' => 'btn btn-danger',
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 'label' => Yii::t('app', 'Icon'),
86 86
                 'value' => function($model) {
87 87
                     /* @var $model app\models\Page */
88
-                    return Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]);
88
+                    return Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]);
89 89
                 },
90 90
                 'format' => 'raw',
91 91
             ],
@@ -93,29 +93,29 @@  discard block
 block discarded – undo
93 93
                 'label' => Yii::t('app', 'Active status'),
94 94
                 'value' => function($model) {
95 95
                     /* @var $model app\models\Page */
96
-                    if ($model->active == 1){
97
-                        return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>';
96
+                    if ($model->active == 1) {
97
+                        return '<i class="fa fa-check-circle text-success"> '.Yii::t('app', 'Active').'</i>';
98 98
                     } else {
99
-                        return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>';
99
+                        return '<i class="fa fa-times text-danger"> '.Yii::t('app', 'Inactive').'</i>';
100 100
                     }
101 101
                 },
102 102
                 'format' => 'raw',
103 103
             ],
104 104
             [
105 105
                 'attribute' => 'created_at',
106
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
106
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
107 107
                 'label' => Yii::t('app', 'Created date'),
108 108
             ],
109 109
             [
110 110
                 'attribute' => 'updated_at',
111
-                'format' =>  ['date', 'dd.MM.Y HH:mm:ss'],
111
+                'format' =>  [ 'date', 'dd.MM.Y HH:mm:ss' ],
112 112
                 'label' => Yii::t('app', 'Updated date'),
113 113
             ],
114 114
         ],
115 115
     ]) ?>
116 116
 
117 117
     <?php echo Html::a(Yii::t('pages', 'View products'), [
118
-        '/'.$this->params['shortLanguage'].'/admin/products/index', 'ProductSearch[pageId]' => $model->id
118
+        '/'.$this->params[ 'shortLanguage' ].'/admin/products/index', 'ProductSearch[pageId]' => $model->id
119 119
     ], [
120 120
         'class' => 'btn btn-primary'
121 121
     ]) ?>
Please login to merge, or discard this patch.
views/admin/pages/MultiLevelMenu/form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,4 +16,4 @@
 block discarded – undo
16 16
     'uncheck' => false,
17 17
     'onMouseDown' => 'this.isChecked=this.checked;',
18 18
     'onClick' => 'this.checked=!this.isChecked;',
19
-]);  ?>
19
+]); ?>
Please login to merge, or discard this patch.
views/admin/pages/MultiLevelMenu/index.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
 <div class="row">
9 9
     <div class="col-md-1">
10 10
         <?php echo Html::a(
11
-            Html::tag('i', '', ['class' => empty($data->icon) ? 'fa fa-file fa-2x' : $data->icon]),
12
-            Url::to([$urlPrefix.'view', 'id' => $data->id])
11
+            Html::tag('i', '', [ 'class' => empty($data->icon) ? 'fa fa-file fa-2x' : $data->icon ]),
12
+            Url::to([ $urlPrefix.'view', 'id' => $data->id ])
13 13
         ) ?>
14 14
     </div>
15 15
     <div class="col-md-4">
16 16
         <?php echo Html::a(
17 17
             Html::encode($data->getDefaultTranslate('title')),
18
-            Url::to([$urlPrefix.'view', 'id' => $data->id])
18
+            Url::to([ $urlPrefix.'view', 'id' => $data->id ])
19 19
         ) ?>
20 20
     </div>
21 21
     <div class="col-md-2">
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             Html::tag('span', '', [
37 37
                 'class' => 'glyphicon glyphicon-eye-open',
38 38
             ]),
39
-            Url::to([$urlPrefix.'view', 'id' => $data->id]),
39
+            Url::to([ $urlPrefix.'view', 'id' => $data->id ]),
40 40
             [
41 41
                 'title' => 'View',
42 42
                 'aria-label' => 'View',
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             Html::tag('span', '', [
48 48
                 'class' => 'glyphicon glyphicon-pencil',
49 49
             ]),
50
-            Url::to([$urlPrefix.'update', 'id' => $data->id]),
50
+            Url::to([ $urlPrefix.'update', 'id' => $data->id ]),
51 51
             [
52 52
                 'title' => 'Update',
53 53
                 'aria-label' => 'Update',
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             Html::tag('span', '', [
59 59
                 'class' => 'glyphicon glyphicon-trash',
60 60
             ]),
61
-            Url::to([$urlPrefix.'delete', 'id' => $data->id]),
61
+            Url::to([ $urlPrefix.'delete', 'id' => $data->id ]),
62 62
             [
63 63
                 'title' => 'Delete',
64 64
                 'aria-label' => 'Delete',
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,11 @@
 block discarded – undo
27 27
     <div class="col-md-2">
28 28
         <?php if ($data->active == 1): ?>
29 29
             <i class="fa fa-check-circle text-success"> <?php echo Yii::t('app', 'Active'); ?></i>
30
-        <?php else: ?>
31
-            <i class="fa fa-times text-danger"> <?php echo Yii::t('app', 'Inactive'); ?></i>
30
+        <?php else {
31
+    : ?>
32
+            <i class="fa fa-times text-danger"> <?php echo Yii::t('app', 'Inactive');
33
+}
34
+?></i>
32 35
         <?php endif; ?>
33 36
     </div>
34 37
     <div class="col-md-1">
Please login to merge, or discard this patch.
views/admin/pages/create.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 /* @var $pages array|\yii\db\ActiveRecord[] */
6 6
 
7 7
 $this->title = Yii::t('pages', 'Create page');
8
-$this->params['breadcrumbs'][] = [
8
+$this->params[ 'breadcrumbs' ][ ] = [
9 9
     'label' => Yii::t('pages', 'Pages'),
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="page-create">
17 17
 
Please login to merge, or discard this patch.
views/admin/products/_form.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
                             'filebrowserWindowHeight' => '700',
49 49
                             'extraPlugins' => 'pbckcode',
50 50
                             'toolbarGroups' => [
51
-                                ['name' => 'pbckcode']
51
+                                [ 'name' => 'pbckcode' ]
52 52
                             ],
53 53
                             'allowedContent' => true,
54
-                            'language' => $this->params['shortLanguage'],
54
+                            'language' => $this->params[ 'shortLanguage' ],
55 55
                         ]
56 56
                     ],
57 57
                     [
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
             ])->label(Yii::t('app', 'Icon html class')); ?>
77 77
             <div class="row" style="margin-bottom: 15px;">
78 78
                 <div class="col-md-12">
79
-                    <?php if(!$model->mainModel->isNewRecord): ?>
80
-                        <?php echo Html::tag('i', '', ['class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon]) ?>
79
+                    <?php if (!$model->mainModel->isNewRecord): ?>
80
+                        <?php echo Html::tag('i', '', [ 'class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon ]) ?>
81 81
                     <?php endif; ?>
82 82
                     <?php echo Html::a('Fontawesome icons', Url::to('https://fontawesome.ru/all-icons/'), [
83 83
                         'target' => '_blank'
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                     <?php
86 86
                     Modal::begin([
87 87
                         'header' => '<h2>Fe icons</h2>',
88
-                        'toggleButton' => ['label' => 'Fe icons']
88
+                        'toggleButton' => [ 'label' => 'Fe icons' ]
89 89
                     ]);
90 90
                     require __DIR__.'/../icons/fe-icons.php';
91 91
                     Modal::end();
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             </div>
95 95
 
96 96
             <?php echo $form->field($model, 'active')
97
-                ->radioList([1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive')])
97
+                ->radioList([ 1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive') ])
98 98
                 ->label(Yii::t('app', 'Active status')); ?>
99 99
 
100 100
             <div class="form-group <?php if ($model->hasErrors('pageId')):?>has-error<?php endif; ?>">
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
                     ],
111 111
                     'mainContainerOptions' => [
112 112
                         'levels' => [
113
-                            ['style' => 'margin-left: 0; padding-left: 0;'],
114
-                            ['style' => 'margin-left: 10px; padding-left: 10px;'],
113
+                            [ 'style' => 'margin-left: 0; padding-left: 0;' ],
114
+                            [ 'style' => 'margin-left: 10px; padding-left: 10px;' ],
115 115
                         ]
116 116
                     ],
117 117
                     'itemContainerOptions' => [
Please login to merge, or discard this patch.
views/admin/products/update.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,21 +4,21 @@
 block discarded – undo
4 4
 /* @var $model Itstructure\AdminModule\models\MultilanguageValidateModel */
5 5
 /* @var $pages array|\yii\db\ActiveRecord[] */
6 6
 
7
-$this->title = Yii::t('products', 'Update product').': ' . $model->mainModel->getDefaultTranslate('title');
8
-$this->params['breadcrumbs'][] = [
7
+$this->title = Yii::t('products', 'Update product').': '.$model->mainModel->getDefaultTranslate('title');
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'][] = [
14
+$this->params[ 'breadcrumbs' ][ ] = [
15 15
     'label' => $model->mainModel->getDefaultTranslate('title'),
16 16
     'url' => [
17
-        $this->params['urlPrefix'].'view',
17
+        $this->params[ 'urlPrefix' ].'view',
18 18
         'id' => $model->id
19 19
     ]
20 20
 ];
21
-$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
21
+$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update');
22 22
 ?>
23 23
 <div class="product-update">
24 24
 
Please login to merge, or discard this patch.