@@ -97,14 +97,14 @@ |
||
| 97 | 97 | [ |
| 98 | 98 | 'code', |
| 99 | 99 | 'default', |
| 100 | - 'value' => function ($model, $attribute) { |
|
| 100 | + 'value' => function($model, $attribute) { |
|
| 101 | 101 | return "sx_auto_" . md5(rand(1, 10) . time()); |
| 102 | 102 | } |
| 103 | 103 | ], |
| 104 | 104 | [ |
| 105 | 105 | 'priority', |
| 106 | 106 | 'default', |
| 107 | - 'value' => function ($model, $attribute) { |
|
| 107 | + 'value' => function($model, $attribute) { |
|
| 108 | 108 | return 500; |
| 109 | 109 | } |
| 110 | 110 | ], |
@@ -380,7 +380,7 @@ |
||
| 380 | 380 | [ |
| 381 | 381 | ['name'], |
| 382 | 382 | 'default', |
| 383 | - 'value' => function (self $model) { |
|
| 383 | + 'value' => function(self $model) { |
|
| 384 | 384 | $lastTree = static::find()->orderBy(["id" => SORT_DESC])->one(); |
| 385 | 385 | if ($lastTree) { |
| 386 | 386 | return "pk-" . $lastTree->primaryKey; |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | BlameableBehavior::className() => |
| 46 | 46 | [ |
| 47 | 47 | 'class' => BlameableBehavior::className(), |
| 48 | - 'value' => function ($event) { |
|
| 48 | + 'value' => function($event) { |
|
| 49 | 49 | if (\Yii::$app instanceof \yii\console\Application) { |
| 50 | 50 | return null; |
| 51 | 51 | } else { |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | public function getRelatedProperties() |
| 77 | 77 | { |
| 78 | 78 | $className = $this->relatedPropertyClassName; |
| 79 | - $find = $className::find()->orderBy(['priority' => SORT_ASC]);; |
|
| 79 | + $find = $className::find()->orderBy(['priority' => SORT_ASC]); ; |
|
| 80 | 80 | $find->multiple = true; |
| 81 | 81 | |
| 82 | 82 | return $find; |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | [ |
| 287 | 287 | 'tree_id', |
| 288 | 288 | 'default', |
| 289 | - 'value' => function () { |
|
| 289 | + 'value' => function() { |
|
| 290 | 290 | if ($this->cmsContent->defaultTree) { |
| 291 | 291 | return $this->cmsContent->defaultTree->id; |
| 292 | 292 | } |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | [ |
| 330 | 330 | 'parent_content_element_id', |
| 331 | 331 | 'required', |
| 332 | - 'when' => function (CmsContentElement $model) { |
|
| 332 | + 'when' => function(CmsContentElement $model) { |
|
| 333 | 333 | |
| 334 | 334 | if ($model->cmsContent && $model->cmsContent->parentContent) { |
| 335 | 335 | return (bool)($model->cmsContent->parent_content_is_required == "Y"); |
@@ -23,8 +23,11 @@ |
||
| 23 | 23 | <a href="<?= $widget->getOpenCloseLink($model); ?>" class="btn btn-sm btn-default"> |
| 24 | 24 | <span class="glyphicon glyphicon-minus" title="<?= \Yii::t('skeeks/cms', "Minimize"); ?>"></span> |
| 25 | 25 | </a> |
| 26 | - <?php else : ?> |
|
| 27 | - <a href="<?= $widget->getOpenCloseLink($model); ?>" class="btn btn-sm btn-default"> |
|
| 26 | + <?php else { |
|
| 27 | + : ?> |
|
| 28 | + <a href="<?= $widget->getOpenCloseLink($model); |
|
| 29 | +} |
|
| 30 | +?>" class="btn btn-sm btn-default"> |
|
| 28 | 31 | <span class="glyphicon glyphicon-plus" title="<?= \Yii::t('skeeks/cms', "Restore"); ?>"></span> |
| 29 | 32 | </a> |
| 30 | 33 | <?php endif; ?> |
@@ -16,13 +16,16 @@ |
||
| 16 | 16 | <?php if ($widget->modelAttributeSaveType) : ?> |
| 17 | 17 | <?= \yii\helpers\Html::activeRadioList($widget->model, $widget->modelAttributeSaveType, |
| 18 | 18 | \skeeks\cms\widgets\formInputs\comboText\ComboTextInputWidget::editors()) ?> |
| 19 | - <?php else : ?> |
|
| 19 | + <?php else { |
|
| 20 | + : ?> |
|
| 20 | 21 | <?= \yii\helpers\Html::radioList( |
| 21 | 22 | $widget->id . '-radio', |
| 22 | 23 | $widget->defaultEditor, |
| 23 | 24 | \skeeks\cms\widgets\formInputs\comboText\ComboTextInputWidget::editors() |
| 24 | 25 | ) ?> |
| 25 | - <?php endif; ?> |
|
| 26 | + <?php endif; |
|
| 27 | +} |
|
| 28 | +?> |
|
| 26 | 29 | </div> |
| 27 | 30 | <div class="sx-controll"> |
| 28 | 31 | <?= $textarea; ?> |
@@ -99,8 +99,11 @@ discard block |
||
| 99 | 99 | <img src="<?= \Yii::$app->imaging->getImagingUrl($imageFile->src, |
| 100 | 100 | new \skeeks\cms\components\imaging\filters\Thumbnail()); ?>"/> |
| 101 | 101 | </a> |
| 102 | - <?php else : ?> |
|
| 103 | - <?= $imageFile->name ? $imageFile->name : $imageFile->original_name; ?> |
|
| 102 | + <?php else { |
|
| 103 | + : ?> |
|
| 104 | + <?= $imageFile->name ? $imageFile->name : $imageFile->original_name; |
|
| 105 | +} |
|
| 106 | +?> |
|
| 104 | 107 | <?php endif; ?> |
| 105 | 108 | |
| 106 | 109 | <div class="sx-controlls"> |
@@ -122,8 +125,11 @@ discard block |
||
| 122 | 125 | } |
| 123 | 126 | ?> |
| 124 | 127 | </div> |
| 125 | - <?php else : ?> |
|
| 126 | - <?= $widget->renderItem($imageFile); ?> |
|
| 128 | + <?php else { |
|
| 129 | + : ?> |
|
| 130 | + <?= $widget->renderItem($imageFile); |
|
| 131 | +} |
|
| 132 | +?> |
|
| 127 | 133 | <?php endif; ?> |
| 128 | 134 | </div> |
| 129 | 135 | <?php endif; ?> |
@@ -107,8 +107,11 @@ |
||
| 107 | 107 | ]); |
| 108 | 108 | ?> |
| 109 | 109 | </div> |
| 110 | - <?php else : ?> |
|
| 111 | - <?= $widget->renderItem($imageFile); ?> |
|
| 110 | + <?php else { |
|
| 111 | + : ?> |
|
| 112 | + <?= $widget->renderItem($imageFile); |
|
| 113 | +} |
|
| 114 | +?> |
|
| 112 | 115 | <?php endif; ?> |
| 113 | 116 | |
| 114 | 117 | </div> |