@@ -299,7 +299,7 @@ |
||
299 | 299 | * @param string $tableName |
300 | 300 | * @return bool |
301 | 301 | */ |
302 | - private static function hasClosing($tableName){ |
|
302 | + private static function hasClosing($tableName) { |
|
303 | 303 | $closing = Closing::findOne($tableName); |
304 | 304 | return !($closing == null); |
305 | 305 | } |
@@ -95,15 +95,15 @@ discard block |
||
95 | 95 | |
96 | 96 | |
97 | 97 | /** {@inheritdoc} */ |
98 | - public function setSettings(){ |
|
98 | + public function setSettings() { |
|
99 | 99 | // get existing settings |
100 | 100 | |
101 | 101 | /** @var yii\db\ActiveRecord $settingClass */ |
102 | 102 | $settingClass = $this->itemClass; |
103 | 103 | $query = $settingClass::find(); |
104 | 104 | $settings = $query->all(); |
105 | - if(!empty($settings)){ |
|
106 | - foreach ($settings as $setting){ |
|
105 | + if (!empty($settings)) { |
|
106 | + foreach ($settings as $setting) { |
|
107 | 107 | if (in_array($setting->key, array_keys($this->attributes))) { |
108 | 108 | $this->settings[$setting->key] = $setting; |
109 | 109 | $this->{$setting->key} = $setting->value; |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | /** {@inheritdoc} */ |
129 | - public function save(){ |
|
130 | - if(!empty($this->settings)){ |
|
131 | - foreach ($this->settings as $key=> $setting){ |
|
129 | + public function save() { |
|
130 | + if (!empty($this->settings)) { |
|
131 | + foreach ($this->settings as $key=> $setting) { |
|
132 | 132 | if (in_array($setting->key, array_keys($this->attributes))) { |
133 | 133 | $setting->save(); |
134 | 134 | $this->settings[$key] = $setting; |
@@ -77,7 +77,7 @@ |
||
77 | 77 | return Html::a(Html::encode($model-><?= $nameAttribute ?>), ['view', <?= $urlParams ?>]); |
78 | 78 | }, |
79 | 79 | ]) ?> |
80 | - <?php endif;?> |
|
80 | + <?php endif; ?> |
|
81 | 81 | |
82 | 82 | </div> |
83 | 83 | </div> |
@@ -69,7 +69,8 @@ discard block |
||
69 | 69 | ['class' => 'yii\grid\ActionColumn'], |
70 | 70 | ], |
71 | 71 | ]); ?> |
72 | - <?php else: ?> |
|
72 | + <?php else { |
|
73 | + : ?> |
|
73 | 74 | <?= "<?= " ?>ListView::widget([ |
74 | 75 | 'dataProvider' => $dataProvider, |
75 | 76 | 'itemOptions' => ['class' => 'item'], |
@@ -77,7 +78,9 @@ discard block |
||
77 | 78 | return Html::a(Html::encode($model-><?= $nameAttribute ?>), ['view', <?= $urlParams ?>]); |
78 | 79 | }, |
79 | 80 | ]) ?> |
80 | - <?php endif;?> |
|
81 | + <?php endif; |
|
82 | +} |
|
83 | +?> |
|
81 | 84 | |
82 | 85 | </div> |
83 | 86 | </div> |
@@ -33,9 +33,12 @@ discard block |
||
33 | 33 | use <?= ltrim($generator->modelClass, '\\') ?>; |
34 | 34 | <?php if (!empty($generator->searchModelClass)): ?> |
35 | 35 | use <?= ltrim($generator->searchModelClass, '\\') . (isset($searchModelAlias) ? " as $searchModelAlias" : "") ?>; |
36 | -<?php else : ?> |
|
36 | +<?php else { |
|
37 | + : ?> |
|
37 | 38 | use yii\data\ActiveDataProvider; |
38 | -<?php endif; ?> |
|
39 | +<?php endif; |
|
40 | +} |
|
41 | +?> |
|
39 | 42 | use <?= ltrim($generator->baseControllerClass, '\\') ?>; |
40 | 43 | use yii\web\NotFoundHttpException; |
41 | 44 | use yii\web\ForbiddenHttpException; |
@@ -97,7 +100,8 @@ discard block |
||
97 | 100 | 'searchModel' => $searchModel, |
98 | 101 | 'dataProvider' => $dataProvider, |
99 | 102 | ]); |
100 | -<?php else : ?> |
|
103 | +<?php else { |
|
104 | + : ?> |
|
101 | 105 | $dataProvider = new ActiveDataProvider([ |
102 | 106 | 'query' => <?= $modelClass ?>::find(), |
103 | 107 | ]); |
@@ -105,7 +109,9 @@ discard block |
||
105 | 109 | return $this->render('index', [ |
106 | 110 | 'dataProvider' => $dataProvider, |
107 | 111 | ]); |
108 | -<?php endif; ?> |
|
112 | +<?php endif; |
|
113 | +} |
|
114 | +?> |
|
109 | 115 | } |
110 | 116 | |
111 | 117 | /** |