@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | ], |
8 | 8 | 'components' => [ |
9 | 9 | 'cache' => [ |
10 | - 'keyPrefix' => 'web', //前缀 |
|
10 | + 'keyPrefix' => 'web', //前缀 |
|
11 | 11 | ], |
12 | 12 | 'authManager' => [ |
13 | 13 | 'class' => yuncms\rbac\DbManager::class, |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | 'secureProtocolHeaders' => [ |
30 | 30 | 'X-Forwarded-Proto' => ['https'], // Common |
31 | 31 | 'Front-End-Https' => ['on'], // Microsoft |
32 | - 'X-Client-Scheme' => ['https'],// Aliyun CDN |
|
32 | + 'X-Client-Scheme' => ['https'], // Aliyun CDN |
|
33 | 33 | 'X-Client-Proto' => ['https'], |
34 | 34 | ], |
35 | 35 | 'ipHeaders' => [ |
36 | - 'X-Forwarded-For',// Common |
|
36 | + 'X-Forwarded-For', // Common |
|
37 | 37 | 'X-Cluster-Client-IP', |
38 | - 'ALI-CDN-REAL-IP',// Aliyun CDN |
|
38 | + 'ALI-CDN-REAL-IP', // Aliyun CDN |
|
39 | 39 | 'Client-IP', |
40 | 40 | 'X-Forwarded', |
41 | 41 | 'Forwarded-For', |
@@ -42,7 +42,7 @@ |
||
42 | 42 | { |
43 | 43 | /** @var ActiveRecord $class */ |
44 | 44 | $class = $this->modelClass; |
45 | - $class::create($this->attributes,$this->runValidation); |
|
45 | + $class::create($this->attributes, $this->runValidation); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -42,7 +42,7 @@ |
||
42 | 42 | { |
43 | 43 | /** @var ActiveRecord $class */ |
44 | 44 | $class = $this->modelClass; |
45 | - $class::create($this->attributes,$this->runValidation); |
|
45 | + $class::create($this->attributes, $this->runValidation); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -40,30 +40,30 @@ |
||
40 | 40 | public function events() |
41 | 41 | { |
42 | 42 | return [ |
43 | - ActiveRecord::EVENT_INIT => function () { |
|
43 | + ActiveRecord::EVENT_INIT => function() { |
|
44 | 44 | $this->initialization(); |
45 | 45 | }, |
46 | - ActiveRecord::EVENT_AFTER_FIND => function () { |
|
46 | + ActiveRecord::EVENT_AFTER_FIND => function() { |
|
47 | 47 | $this->decode(); |
48 | 48 | }, |
49 | - ActiveRecord::EVENT_BEFORE_INSERT => function () { |
|
49 | + ActiveRecord::EVENT_BEFORE_INSERT => function() { |
|
50 | 50 | $this->encode(); |
51 | 51 | }, |
52 | - ActiveRecord::EVENT_BEFORE_UPDATE => function () { |
|
52 | + ActiveRecord::EVENT_BEFORE_UPDATE => function() { |
|
53 | 53 | $this->encode(); |
54 | 54 | }, |
55 | - ActiveRecord::EVENT_AFTER_INSERT => function () { |
|
55 | + ActiveRecord::EVENT_AFTER_INSERT => function() { |
|
56 | 56 | $this->decode(); |
57 | 57 | }, |
58 | - ActiveRecord::EVENT_AFTER_UPDATE => function () { |
|
58 | + ActiveRecord::EVENT_AFTER_UPDATE => function() { |
|
59 | 59 | $this->decode(); |
60 | 60 | }, |
61 | - ActiveRecord::EVENT_BEFORE_VALIDATE => function () { |
|
61 | + ActiveRecord::EVENT_BEFORE_VALIDATE => function() { |
|
62 | 62 | if ($this->encodeBeforeValidation) { |
63 | 63 | $this->encodeValidate(); |
64 | 64 | } |
65 | 65 | }, |
66 | - ActiveRecord::EVENT_AFTER_VALIDATE => function () { |
|
66 | + ActiveRecord::EVENT_AFTER_VALIDATE => function() { |
|
67 | 67 | if ($this->encodeBeforeValidation) { |
68 | 68 | $this->decode(); |
69 | 69 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | 'attribute' => 'description', |
82 | 82 | 'label' => Yii::t('yuncms', 'Role Description'), |
83 | 83 | ], |
84 | - ['class' => 'yuncms\grid\ActionColumn',], |
|
84 | + ['class' => 'yuncms\grid\ActionColumn', ], |
|
85 | 85 | ], |
86 | 86 | ]) |
87 | 87 | ?> |
@@ -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' => 'yuncms\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'), |
@@ -30,9 +30,9 @@ |
||
30 | 30 | 'unconfirmed_email' => $this->string(150)->comment('Unconfirmed Email'), |
31 | 31 | 'unconfirmed_mobile' => $this->string(11)->comment('Unconfirmed Mobile'), |
32 | 32 | 'registration_ip' => $this->string()->comment('Registration Ip'), |
33 | - 'identified' => $this->boolean()->defaultValue(false)->comment('Identified'),//是否经过实名认证 |
|
34 | - 'balance' => $this->decimal(12, 2)->defaultValue(0),//可提现余额 |
|
35 | - 'available_balance' => $this->decimal(12, 2)->defaultValue(0),//未结算余额 |
|
33 | + 'identified' => $this->boolean()->defaultValue(false)->comment('Identified'), //是否经过实名认证 |
|
34 | + 'balance' => $this->decimal(12, 2)->defaultValue(0), //可提现余额 |
|
35 | + 'available_balance' => $this->decimal(12, 2)->defaultValue(0), //未结算余额 |
|
36 | 36 | 'flags' => $this->integer()->defaultValue(0)->comment('Flags'), |
37 | 37 | 'email_confirmed_at' => $this->unixTimestamp()->comment('Email Confirmed At'), |
38 | 38 | 'mobile_confirmed_at' => $this->unixTimestamp()->comment('Mobile Confirmed At'), |
@@ -19,7 +19,7 @@ |
||
19 | 19 | /* @var $this yii\web\View */ |
20 | 20 | /* @var $model <?= ltrim($generator->modelClass, '\\') ?> */ |
21 | 21 | |
22 | -$this->title = <?= $generator->generateString('Update '.Inflector::camel2words(StringHelper::basename($generator->modelClass)))?> . ': ' . $model-><?= $generator->getNameAttribute() ?>; |
|
22 | +$this->title = <?= $generator->generateString('Update ' . Inflector::camel2words(StringHelper::basename($generator->modelClass)))?> . ': ' . $model-><?= $generator->getNameAttribute() ?>; |
|
23 | 23 | $this->params['breadcrumbs'][] = ['label' => <?= $generator->generateString('Manage ' . Inflector::camel2words(StringHelper::basename($generator->modelClass))) ?>, 'url' => ['index']]; |
24 | 24 | $this->params['breadcrumbs'][] = ['label' => $model-><?= $generator->getNameAttribute() ?>, 'url' => ['view', <?= $urlParams ?>]]; |
25 | 25 | $this->params['breadcrumbs'][] = Yii::t('yuncms', 'Update'); |
@@ -78,7 +78,7 @@ |
||
78 | 78 | } |
79 | 79 | return $model; |
80 | 80 | } else { |
81 | - throw new NotFoundHttpException ('User not found.'); |
|
81 | + throw new NotFoundHttpException('User not found.'); |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 |