@@ -78,7 +78,7 @@ |
||
| 78 | 78 | [ |
| 79 | 79 | [ |
| 80 | 80 | 'allow' => true, |
| 81 | - 'matchCallback' => function ($rule, $action) { |
|
| 81 | + 'matchCallback' => function($rule, $action) { |
|
| 82 | 82 | return $this->isOwner; |
| 83 | 83 | } |
| 84 | 84 | ] |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | ], |
| 397 | 397 | ]); |
| 398 | 398 | |
| 399 | - $this->_content = CmsContent::getDb()->cache(function ($db) use ($content_id) { |
|
| 399 | + $this->_content = CmsContent::getDb()->cache(function($db) use ($content_id) { |
|
| 400 | 400 | return CmsContent::find()->where([ |
| 401 | 401 | "id" => $content_id, |
| 402 | 402 | ])->one(); |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | 'visible' => false, |
| 511 | 511 | 'format' => 'raw', |
| 512 | 512 | 'class' => \yii\grid\DataColumn::class, |
| 513 | - 'value' => function ($model, $key, $index) use ($name) { |
|
| 513 | + 'value' => function($model, $key, $index) use ($name) { |
|
| 514 | 514 | if (is_array($model->{$name})) { |
| 515 | 515 | return implode(",", $model->{$name}); |
| 516 | 516 | } else { |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | |
| 574 | 574 | [ |
| 575 | 575 | 'class' => \yii\grid\DataColumn::class, |
| 576 | - 'value' => function (\skeeks\cms\models\CmsContentElement $model) { |
|
| 576 | + 'value' => function(\skeeks\cms\models\CmsContentElement $model) { |
|
| 577 | 577 | if (!$model->cmsTree) { |
| 578 | 578 | return null; |
| 579 | 579 | } |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | |
| 601 | 601 | 'additionalSections' => [ |
| 602 | 602 | 'class' => \yii\grid\DataColumn::class, |
| 603 | - 'value' => function (\skeeks\cms\models\CmsContentElement $model) { |
|
| 603 | + 'value' => function(\skeeks\cms\models\CmsContentElement $model) { |
|
| 604 | 604 | $result = []; |
| 605 | 605 | |
| 606 | 606 | if ($model->cmsContentElementTrees) { |
@@ -628,7 +628,7 @@ discard block |
||
| 628 | 628 | [ |
| 629 | 629 | 'class' => \yii\grid\DataColumn::class, |
| 630 | 630 | 'label' => "Смотреть", |
| 631 | - 'value' => function (\skeeks\cms\models\CmsContentElement $model) { |
|
| 631 | + 'value' => function(\skeeks\cms\models\CmsContentElement $model) { |
|
| 632 | 632 | |
| 633 | 633 | return \yii\helpers\Html::a('<i class="glyphicon glyphicon-arrow-right"></i>', $model->absoluteUrl, |
| 634 | 634 | [ |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | if ($ref = UrlHelper::getCurrent()->getRef()) { |
| 156 | 156 | $rr->redirect = $ref; |
| 157 | 157 | } else { |
| 158 | - $rr->redirect = Yii::$app->getUser()->getReturnUrl();; |
|
| 158 | + $rr->redirect = Yii::$app->getUser()->getReturnUrl(); ; |
|
| 159 | 159 | } |
| 160 | 160 | } else { |
| 161 | 161 | $rr->message = 'Не удалось авторизоваться'; |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | [ |
| 64 | 64 | [ |
| 65 | 65 | 'allow' => true, |
| 66 | - 'matchCallback' => function ($rule, $action) { |
|
| 66 | + 'matchCallback' => function($rule, $action) { |
|
| 67 | 67 | if ($this->model->cmsContent && $this->model->cmsContent->access_check_element == 'Y') { |
| 68 | 68 | //Если такая привилегия заведена, нужно ее проверять. |
| 69 | 69 | if ($permission = \Yii::$app->authManager->getPermission($this->model->permissionName)) { |
@@ -168,7 +168,7 @@ |
||
| 168 | 168 | [ |
| 169 | 169 | 'code', |
| 170 | 170 | 'default', |
| 171 | - 'value' => function ($model, $attribute) { |
|
| 171 | + 'value' => function($model, $attribute) { |
|
| 172 | 172 | return "sxauto" . md5(rand(1, 10) . time()); |
| 173 | 173 | } |
| 174 | 174 | ], |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | [ |
| 237 | 237 | ['username'], |
| 238 | 238 | 'default', |
| 239 | - 'value' => function (self $model) { |
|
| 239 | + 'value' => function(self $model) { |
|
| 240 | 240 | $userLast = static::find()->orderBy("id DESC")->one(); |
| 241 | 241 | return "id" . ($userLast->id + 1); |
| 242 | 242 | } |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | [ |
| 248 | 248 | ['auth_key'], |
| 249 | 249 | 'default', |
| 250 | - 'value' => function (self $model) { |
|
| 250 | + 'value' => function(self $model) { |
|
| 251 | 251 | return \Yii::$app->security->generateRandomString(); |
| 252 | 252 | } |
| 253 | 253 | ], |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | [ |
| 256 | 256 | ['password_hash'], |
| 257 | 257 | 'default', |
| 258 | - 'value' => function (self $model) { |
|
| 258 | + 'value' => function(self $model) { |
|
| 259 | 259 | return \Yii::$app->security->generatePasswordHash(\Yii::$app->security->generateRandomString()); |
| 260 | 260 | } |
| 261 | 261 | ], |
@@ -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 { |