@@ -69,7 +69,7 @@ |
||
69 | 69 | 'pub:boolean', |
70 | 70 | [ |
71 | 71 | 'attribute' => 'status', |
72 | - 'value' => function ($model) { |
|
72 | + 'value' => function($model) { |
|
73 | 73 | return $model->status == \yuncms\models\Volume::STATUS_ACTIVE ? Yii::t('yuncms', 'Active') : Yii::t('yuncms', 'Disable'); |
74 | 74 | }, |
75 | 75 | 'label' => Yii::t('yuncms', 'Status'), |
@@ -38,7 +38,7 @@ |
||
38 | 38 | </div> |
39 | 39 | </div> |
40 | 40 | |
41 | - <?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false,]); ?> |
|
41 | + <?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false, ]); ?> |
|
42 | 42 | <?= $form->field($model, 'identity')->hiddenInput()->label(false) ?> |
43 | 43 | <?= $form->field($model, 'name')->hiddenInput()->label(false) ?> |
44 | 44 | <?= $form->field($model, 'class')->hiddenInput()->label(false) ?> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | /* @var yuncms\models\Volume $model */ |
9 | 9 | /* @var ActiveForm $form */ |
10 | 10 | ?> |
11 | -<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false,]); ?> |
|
11 | +<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false, ]); ?> |
|
12 | 12 | |
13 | 13 | <?= $form->field($model, 'identity')->textInput(['maxlength' => true]) ?> |
14 | 14 | <div class="hr-line-dashed"></div> |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | 'pub:boolean', |
73 | 73 | [ |
74 | 74 | 'attribute' => 'status', |
75 | - 'value' => function ($model) { |
|
75 | + 'value' => function($model) { |
|
76 | 76 | return $model->status == Volume::STATUS_ACTIVE ? Yii::t('yuncms', 'Active') : Yii::t('yuncms', 'Disable'); |
77 | 77 | }, |
78 | 78 | 'label' => Yii::t('yuncms', 'Status'), |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | [ |
99 | 99 | 'class' => 'yuncms\grid\ActionColumn', |
100 | 100 | 'template' => '{configuration} {view} {update} {delete}', |
101 | - 'buttons' => ['configuration' => function ($url, $model, $key) { |
|
101 | + 'buttons' => ['configuration' => function($url, $model, $key) { |
|
102 | 102 | return Html::a('<span class="glyphicon glyphicon-cog"></span>', |
103 | 103 | Url::toRoute(['configuration', 'id' => $model->id]), [ |
104 | 104 | 'title' => Yii::t('yuncms', 'Configuration'), |
@@ -84,7 +84,7 @@ |
||
84 | 84 | } elseif (!is_writable($directory)) { |
85 | 85 | throw new FileException(sprintf('Unable to write in the "%s" directory', $directory)); |
86 | 86 | } |
87 | - $target = rtrim($directory, '/\\').DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); |
|
87 | + $target = rtrim($directory, '/\\') . DIRECTORY_SEPARATOR . (null === $name ? $this->getBasename() : $this->getName($name)); |
|
88 | 88 | return new self($target, false); |
89 | 89 | } |
90 | 90 |
@@ -305,9 +305,9 @@ |
||
305 | 305 | throw new RuntimeException('This object does not support retrieving URLs.'); |
306 | 306 | } |
307 | 307 | //SDK未提供获取 hostname的公开方法,这里变相获取 |
308 | - $temporaryUrl = $this->getTemporaryUrl($path,60,[]); |
|
308 | + $temporaryUrl = $this->getTemporaryUrl($path, 60, []); |
|
309 | 309 | $urls = parse_url($temporaryUrl); |
310 | - return $urls['scheme'] .'://'. $urls['host'] . $urls['path']; |
|
310 | + return $urls['scheme'] . '://' . $urls['host'] . $urls['path']; |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | /** |
@@ -114,7 +114,7 @@ |
||
114 | 114 | ['baseUrl', 'url'], |
115 | 115 | |
116 | 116 | |
117 | - ['name','default','value' => 'YUNCMS'], |
|
117 | + ['name', 'default', 'value' => 'YUNCMS'], |
|
118 | 118 | ]; |
119 | 119 | } |
120 | 120 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | ], |
58 | 58 | 'filesystem' => [ |
59 | 59 | 'class' => yuncms\filesystem\FilesystemManager::class, |
60 | - 'default' => 'public',//默认存储 |
|
60 | + 'default' => 'public', //默认存储 |
|
61 | 61 | 'cloud' => 'cloud', |
62 | 62 | 'disks' => [ |
63 | 63 | 'local' => [//本地存储 |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | 'adapter' => 'local', |
69 | 69 | 'root' => '@root/storage/uploads', |
70 | 70 | 'url' => '@web/storage/uploads', |
71 | - 'visibility' => 'public',//文件默认可见性 |
|
71 | + 'visibility' => 'public', //文件默认可见性 |
|
72 | 72 | ], |
73 | 73 | 'avatar' => [ |
74 | 74 | 'adapter' => 'local', |
75 | 75 | 'root' => '@root/storage/avatar', |
76 | 76 | 'url' => '@web/storage/avatar', |
77 | - 'visibility' => 'public',//文件默认可见性 |
|
77 | + 'visibility' => 'public', //文件默认可见性 |
|
78 | 78 | ], |
79 | 79 | 'cloud' => [//默认云存储 |
80 | 80 | 'adapter' => 'oss', |
@@ -151,7 +151,7 @@ |
||
151 | 151 | { |
152 | 152 | if ($this->_user === null) { |
153 | 153 | $client = $this->wechat->miniProgram; |
154 | - $client->useOpenId = false;//使用unionid |
|
154 | + $client->useOpenId = false; //使用unionid |
|
155 | 155 | $client->validateAuthState = false; |
156 | 156 | $token = $client->fetchAccessToken($this->code); |
157 | 157 | $tokenParams = $token->getParams(); |