@@ -116,7 +116,7 @@ |
||
| 116 | 116 | { |
| 117 | 117 | if ($this->hasModel()) { |
| 118 | 118 | $input = Html::activeTextInput($this->model, $this->attribute, $this->options); |
| 119 | - $this->mobileField = Html::getInputId($this->model,$this->mobileField); |
|
| 119 | + $this->mobileField = Html::getInputId($this->model, $this->mobileField); |
|
| 120 | 120 | } else { |
| 121 | 121 | $input = Html::textInput($this->name, $this->value, $this->options); |
| 122 | 122 | $this->mobileField = $this->name; |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | * @inheritdoc |
| 20 | 20 | */ |
| 21 | 21 | protected function defaultTitle() { |
| 22 | - return Yii::t('yuncms','LinkedIn'); |
|
| 22 | + return Yii::t('yuncms', 'LinkedIn'); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -11,20 +11,20 @@ |
||
| 11 | 11 | ], |
| 12 | 12 | 'components' => [ |
| 13 | 13 | 'cache' => [ |
| 14 | - 'keyPrefix' => 'wechat', //前缀 |
|
| 14 | + 'keyPrefix' => 'wechat', //前缀 |
|
| 15 | 15 | ], |
| 16 | 16 | 'request' => [ |
| 17 | 17 | 'class' => yuncms\wechat\Request::class, |
| 18 | 18 | 'secureProtocolHeaders' => [ |
| 19 | 19 | 'X-Forwarded-Proto' => ['https'], // Common |
| 20 | 20 | 'Front-End-Https' => ['on'], // Microsoft |
| 21 | - 'X-Client-Scheme' => ['https'],// Aliyun CDN |
|
| 21 | + 'X-Client-Scheme' => ['https'], // Aliyun CDN |
|
| 22 | 22 | 'X-Client-Proto' => ['https'], |
| 23 | 23 | ], |
| 24 | 24 | 'ipHeaders' => [ |
| 25 | - 'X-Forwarded-For',// Common |
|
| 25 | + 'X-Forwarded-For', // Common |
|
| 26 | 26 | 'X-Cluster-Client-IP', |
| 27 | - 'ALI-CDN-REAL-IP',// Aliyun CDN |
|
| 27 | + 'ALI-CDN-REAL-IP', // Aliyun CDN |
|
| 28 | 28 | 'Client-IP', |
| 29 | 29 | 'X-Forwarded', |
| 30 | 30 | 'Forwarded-For', |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | class Admin extends ActiveRecord implements IdentityInterface |
| 31 | 31 | { |
| 32 | 32 | //场景定义 |
| 33 | - const SCENARIO_CREATE = 'create';//创建 |
|
| 34 | - const SCENARIO_UPDATE = 'update';//更新 |
|
| 33 | + const SCENARIO_CREATE = 'create'; //创建 |
|
| 34 | + const SCENARIO_UPDATE = 'update'; //更新 |
|
| 35 | 35 | |
| 36 | 36 | const STATUS_ACTIVE = 0b0; |
| 37 | 37 | const STATUS_DELETED = 0b1; |
@@ -11,9 +11,11 @@ |
||
| 11 | 11 | <?php foreach ($fields as $field): |
| 12 | 12 | if (empty($field['decorators'])): ?> |
| 13 | 13 | '<?= $field['property'] ?>', |
| 14 | -<?php else: ?> |
|
| 14 | +<?php else { |
|
| 15 | + : ?> |
|
| 15 | 16 | <?= "'{$field['property']}' => \$this->{$field['decorators']}" ?>, |
| 16 | 17 | <?php endif; |
| 18 | +} |
|
| 17 | 19 | endforeach; ?> |
| 18 | 20 | ], $tableOptions); |
| 19 | 21 | <?= $this->render('_addForeignKeys', [ |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | 'email:email', |
| 55 | 55 | [ |
| 56 | 56 | 'attribute' => 'status', |
| 57 | - 'value' => function ($model) { |
|
| 57 | + 'value' => function($model) { |
|
| 58 | 58 | return $model->status == Admin::STATUS_ACTIVE ? Yii::t('yuncms', 'Active') : Yii::t('yuncms', 'Disable'); |
| 59 | 59 | }, |
| 60 | 60 | 'label' => Yii::t('yuncms', 'Status'), |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | 'class' => 'yii\grid\ActionColumn', |
| 67 | 67 | 'header' => Yii::t('yuncms', 'Operation'), |
| 68 | 68 | 'template' => '{assignment} {view} {update} {delete}', |
| 69 | - 'buttons' => ['assignment' => function ($url, $model, $key) { |
|
| 69 | + 'buttons' => ['assignment' => function($url, $model, $key) { |
|
| 70 | 70 | return Html::a('<span class="glyphicon glyphicon-dashboard"></span>', |
| 71 | 71 | Url::toRoute(['assignment/view', 'id' => $model->id]), [ |
| 72 | 72 | 'title' => Yii::t('yuncms', 'Assignment'), |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | if (($model = Admin::findOne($id)) !== null) { |
| 124 | 124 | return $model; |
| 125 | 125 | } else { |
| 126 | - throw new NotFoundHttpException (Yii::t('yuncms', 'The requested page does not exist.')); |
|
| 126 | + throw new NotFoundHttpException(Yii::t('yuncms', 'The requested page does not exist.')); |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | } |
@@ -72,8 +72,8 @@ |
||
| 72 | 72 | |
| 73 | 73 | $options = $this->clientOptions !== false && !empty($this->clientOptions) ? Json::encode($this->clientOptions) : 'null'; |
| 74 | 74 | |
| 75 | - foreach($this->dataSets as $dataSet) { |
|
| 76 | - if(empty($dataSet)) { |
|
| 75 | + foreach ($this->dataSets as $dataSet) { |
|
| 76 | + if (empty($dataSet)) { |
|
| 77 | 77 | continue; |
| 78 | 78 | } |
| 79 | 79 | $dataSets[] = Json::encode($dataSet); |
@@ -230,7 +230,7 @@ |
||
| 230 | 230 | } |
| 231 | 231 | return implode(' ', $result); |
| 232 | 232 | } |
| 233 | - return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($user) { |
|
| 233 | + return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($user) { |
|
| 234 | 234 | return static::checkRoute($matches[1], [], $user) ? "{{$matches[1]}}" : ''; |
| 235 | 235 | }, $buttons); |
| 236 | 236 | } |