@@ -4,25 +4,25 @@ |
||
4 | 4 | * @copyright Copyright (c) 2012 TintSoft Technology Co. Ltd. |
5 | 5 | * @license http://www.tintsoft.com/license/ |
6 | 6 | */ |
7 | - namespace xutl\inspinia; |
|
7 | + namespace xutl\inspinia; |
|
8 | 8 | |
9 | - use yii\web\View; |
|
10 | - use yii\web\AssetBundle; |
|
9 | + use yii\web\View; |
|
10 | + use yii\web\AssetBundle; |
|
11 | 11 | |
12 | - class PaceAsset extends AssetBundle{ |
|
13 | - public $sourcePath = '@yuncms/admin/resources/assets'; |
|
12 | + class PaceAsset extends AssetBundle{ |
|
13 | + public $sourcePath = '@yuncms/admin/resources/assets'; |
|
14 | 14 | |
15 | - /** |
|
16 | - * 发布参数 |
|
17 | - * |
|
18 | - * @var array |
|
19 | - */ |
|
20 | - public $jsOptions = [ |
|
21 | - 'position' => View::POS_HEAD, |
|
22 | - 'data-pace-options' => ['restartOnRequestAfter' => true] |
|
23 | - ]; |
|
15 | + /** |
|
16 | + * 发布参数 |
|
17 | + * |
|
18 | + * @var array |
|
19 | + */ |
|
20 | + public $jsOptions = [ |
|
21 | + 'position' => View::POS_HEAD, |
|
22 | + 'data-pace-options' => ['restartOnRequestAfter' => true] |
|
23 | + ]; |
|
24 | 24 | |
25 | - public $js = [ |
|
26 | - 'js/plugins/pace/pace.min.js' |
|
27 | - ]; |
|
28 | - } |
|
29 | 25 | \ No newline at end of file |
26 | + public $js = [ |
|
27 | + 'js/plugins/pace/pace.min.js' |
|
28 | + ]; |
|
29 | + } |
|
30 | 30 | \ No newline at end of file |
@@ -9,7 +9,7 @@ |
||
9 | 9 | use yii\web\View; |
10 | 10 | use yii\web\AssetBundle; |
11 | 11 | |
12 | - class PaceAsset extends AssetBundle{ |
|
12 | + class PaceAsset extends AssetBundle { |
|
13 | 13 | public $sourcePath = '@yuncms/admin/resources/assets'; |
14 | 14 | |
15 | 15 | /** |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. |
39 | 39 | * @since 2.0.1 |
40 | 40 | */ |
41 | - public $footerOptions =[]; |
|
41 | + public $footerOptions = []; |
|
42 | 42 | |
43 | 43 | public $closeButton = true; |
44 | 44 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | protected function renderTools() |
135 | 135 | { |
136 | 136 | $tools = ''; |
137 | - if($this->collapseButton !== false){ |
|
137 | + if ($this->collapseButton !== false) { |
|
138 | 138 | $tools .= '<a class="collapse-link"><i class="fa fa-chevron-up"></i></a>'; |
139 | 139 | } |
140 | 140 | if ($this->closeButton !== false) { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | foreach ($flashes as $type => $data) { |
62 | 62 | if (isset($this->alertTypes[$type])) { |
63 | - $data = (array) $data; |
|
63 | + $data = (array)$data; |
|
64 | 64 | foreach ($data as $i => $message) { |
65 | 65 | /* initialize css class for each alert box */ |
66 | 66 | $this->options['class'] = $this->alertTypes[$type] . $appendCss; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function init() |
37 | 37 | { |
38 | 38 | parent::init(); |
39 | - $this->publishOptions['beforeCopy'] = function ($from, $to) { |
|
39 | + $this->publishOptions['beforeCopy'] = function($from, $to) { |
|
40 | 40 | return preg_match('%(/|\\\\)(fonts|css)%', $from); |
41 | 41 | }; |
42 | 42 | } |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $model = new AdminAuthItem(null); |
80 | 80 | $model->type = $this->type; |
81 | 81 | if ($model->load(Yii::$app->getRequest()->post()) && $model->save()) { |
82 | - Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Create success.')); |
|
82 | + Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Create success.')); |
|
83 | 83 | return $this->redirect(['view', 'id' => $model->name]); |
84 | 84 | } else { |
85 | 85 | return $this->render('create', ['model' => $model]); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | return [ |
69 | 69 | [['ruleName'], 'checkRule'], |
70 | 70 | [['name', 'type'], 'required'], |
71 | - [['name'], 'checkUnique', 'when' => function () { |
|
71 | + [['name'], 'checkUnique', 'when' => function() { |
|
72 | 72 | return $this->isNewRecord || ($this->_item->name != $this->name); |
73 | 73 | }], |
74 | 74 | [['type'], 'integer'], |
@@ -34,7 +34,7 @@ |
||
34 | 34 | parent::init(); |
35 | 35 | if ($this->userClassName === null) { |
36 | 36 | $this->userClassName = Yii::$app->getUser()->identityClass; |
37 | - $this->userClassName ? : 'yuncms\admin\models\Admin'; |
|
37 | + $this->userClassName ?: 'yuncms\admin\models\Admin'; |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'rules' => [ |
54 | 54 | [ |
55 | 55 | 'allow' => true, |
56 | - 'actions' => ['profile', 'account', 'privacy', 'avatar', 'confirm', 'networks', 'disconnect','follower-tag'], |
|
56 | + 'actions' => ['profile', 'account', 'privacy', 'avatar', 'confirm', 'networks', 'disconnect', 'follower-tag'], |
|
57 | 57 | 'roles' => ['@'], |
58 | 58 | ], |
59 | 59 | ], |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | Yii::$app->response->format = Response::FORMAT_JSON; |
129 | 129 | $tagId = Yii::$app->request->post('tag_id', null); |
130 | 130 | if (($tag = Tag::findOne($tagId)) == null) { |
131 | - throw new NotFoundHttpException (); |
|
131 | + throw new NotFoundHttpException(); |
|
132 | 132 | } else { |
133 | 133 | /** @var \yuncms\user\models\User $user */ |
134 | 134 | $user = Yii::$app->user->identity; |
@@ -132,7 +132,7 @@ |
||
132 | 132 | Yii::$app->session->setFlash('danger', Yii::t('yuncms', 'Your account has been blocked.')); |
133 | 133 | $this->action->successUrl = Url::to(['/user/security/login']); |
134 | 134 | } else { |
135 | - Yii::$app->user->login($account->user, Yii::$app->settings->get('rememberFor','user')); |
|
135 | + Yii::$app->user->login($account->user, Yii::$app->settings->get('rememberFor', 'user')); |
|
136 | 136 | $this->action->successUrl = Yii::$app->getUser()->getReturnUrl(); |
137 | 137 | } |
138 | 138 | } else { |