@@ -41,7 +41,7 @@ |
||
41 | 41 | /** |
42 | 42 | * Search BizRule |
43 | 43 | * @param array $params |
44 | - * @return \yii\data\ActiveDataProvider|\yii\data\ArrayDataProvider |
|
44 | + * @return ArrayDataProvider |
|
45 | 45 | */ |
46 | 46 | public function search($params) |
47 | 47 | { |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace mdm\admin\models\searchs; |
4 | 4 | |
5 | -use Yii; |
|
6 | 5 | use yii\base\Model; |
7 | 6 | use yii\data\ActiveDataProvider; |
8 | 7 | use mdm\admin\models\Menu as MenuModel; |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | $query = MenuModel::find() |
47 | 47 | ->from(MenuModel::tableName() . ' t') |
48 | - ->joinWith(['menuParent' => function ($q) { |
|
48 | + ->joinWith(['menuParent' => function($q) { |
|
49 | 49 | $q->from(MenuModel::tableName() . ' parent'); |
50 | 50 | }]); |
51 | 51 |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Message translations. |
|
4 | - * |
|
5 | - * This file is automatically generated by 'yii message' command. |
|
6 | - * It contains the localizable messages extracted from source code. |
|
7 | - * You may modify this file by translating the extracted messages. |
|
8 | - * |
|
9 | - * Each array element represents the translation (value) of a message (key). |
|
10 | - * If the value is empty, the message is considered as not translated. |
|
11 | - * Messages that no longer need translation will have their translations |
|
12 | - * enclosed between a pair of '@@' marks. |
|
13 | - * |
|
14 | - * Message string can be used with plural forms format. Check i18n section |
|
15 | - * of the guide for details. |
|
16 | - * |
|
17 | - * NOTE: this file must be saved in UTF-8 encoding. |
|
18 | - * @author dinhtrung. |
|
19 | - */ |
|
3 | + * Message translations. |
|
4 | + * |
|
5 | + * This file is automatically generated by 'yii message' command. |
|
6 | + * It contains the localizable messages extracted from source code. |
|
7 | + * You may modify this file by translating the extracted messages. |
|
8 | + * |
|
9 | + * Each array element represents the translation (value) of a message (key). |
|
10 | + * If the value is empty, the message is considered as not translated. |
|
11 | + * Messages that no longer need translation will have their translations |
|
12 | + * enclosed between a pair of '@@' marks. |
|
13 | + * |
|
14 | + * Message string can be used with plural forms format. Check i18n section |
|
15 | + * of the guide for details. |
|
16 | + * |
|
17 | + * NOTE: this file must be saved in UTF-8 encoding. |
|
18 | + * @author dinhtrung. |
|
19 | + */ |
|
20 | 20 | return [ |
21 | 21 | 'Append' => 'Thêm vào', |
22 | 22 | 'Application' => 'Ứng dụng', |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Message translations. |
|
4 | - * |
|
5 | - * This file is automatically generated by 'yii message' command. |
|
6 | - * It contains the localizable messages extracted from source code. |
|
7 | - * You may modify this file by translating the extracted messages. |
|
8 | - * |
|
9 | - * Each array element represents the translation (value) of a message (key). |
|
10 | - * If the value is empty, the message is considered as not translated. |
|
11 | - * Messages that no longer need translation will have their translations |
|
12 | - * enclosed between a pair of '@@' marks. |
|
13 | - * |
|
14 | - * Message string can be used with plural forms format. Check i18n section |
|
15 | - * of the guide for details. |
|
16 | - * |
|
17 | - * NOTE: this file must be saved in UTF-8 encoding. |
|
18 | - */ |
|
3 | + * Message translations. |
|
4 | + * |
|
5 | + * This file is automatically generated by 'yii message' command. |
|
6 | + * It contains the localizable messages extracted from source code. |
|
7 | + * You may modify this file by translating the extracted messages. |
|
8 | + * |
|
9 | + * Each array element represents the translation (value) of a message (key). |
|
10 | + * If the value is empty, the message is considered as not translated. |
|
11 | + * Messages that no longer need translation will have their translations |
|
12 | + * enclosed between a pair of '@@' marks. |
|
13 | + * |
|
14 | + * Message string can be used with plural forms format. Check i18n section |
|
15 | + * of the guide for details. |
|
16 | + * |
|
17 | + * NOTE: this file must be saved in UTF-8 encoding. |
|
18 | + */ |
|
19 | 19 | return [ |
20 | 20 | 'Append' => '追加', |
21 | 21 | 'Application' => 'アプリケーション', |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Message translations for \mdmsoft\yii2-admin. |
|
4 | - * |
|
5 | - * It contains the localizable messages extracted from source code. |
|
6 | - * You may modify this file by translating the extracted messages. |
|
7 | - * |
|
8 | - * Each array element represents the translation (value) of a message (key). |
|
9 | - * If the value is empty, the message is considered as not translated. |
|
10 | - * Messages that no longer need translation will have their translations |
|
11 | - * enclosed between a pair of '@@' marks. |
|
12 | - * |
|
13 | - * Message string can be used with plural forms format. Check i18n section |
|
14 | - * of the guide for details. |
|
15 | - * |
|
16 | - * NOTE: this file must be saved in UTF-8 encoding. |
|
17 | - */ |
|
3 | + * Message translations for \mdmsoft\yii2-admin. |
|
4 | + * |
|
5 | + * It contains the localizable messages extracted from source code. |
|
6 | + * You may modify this file by translating the extracted messages. |
|
7 | + * |
|
8 | + * Each array element represents the translation (value) of a message (key). |
|
9 | + * If the value is empty, the message is considered as not translated. |
|
10 | + * Messages that no longer need translation will have their translations |
|
11 | + * enclosed between a pair of '@@' marks. |
|
12 | + * |
|
13 | + * Message string can be used with plural forms format. Check i18n section |
|
14 | + * of the guide for details. |
|
15 | + * |
|
16 | + * NOTE: this file must be saved in UTF-8 encoding. |
|
17 | + */ |
|
18 | 18 | return [ |
19 | 19 | 'Assignments' => 'การกำหนด', |
20 | 20 | 'Users' => 'ผู้ใช้งาน', |
@@ -4,7 +4,7 @@ |
||
4 | 4 | /* @var $this yii\web\View */ |
5 | 5 | /* @var $user mdm\admin\models\User */ |
6 | 6 | |
7 | -$resetLink = Url::to(['user/reset-password','token'=>$user->password_reset_token], true); |
|
7 | +$resetLink = Url::to(['user/reset-password', 'token'=>$user->password_reset_token], true); |
|
8 | 8 | ?> |
9 | 9 | Hello <?= $user->username ?>, |
10 | 10 |
@@ -220,7 +220,7 @@ |
||
220 | 220 | } |
221 | 221 | return implode(' ', $result); |
222 | 222 | } |
223 | - return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($user) { |
|
223 | + return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($user) { |
|
224 | 224 | return static::checkRoute($matches[1], [], $user) ? "{{$matches[1]}}" : ''; |
225 | 225 | }, $buttons); |
226 | 226 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | foreach ($items as $name) { |
46 | 46 | try { |
47 | 47 | $item = $manager->getRole($name); |
48 | - $item = $item ? : $manager->getPermission($name); |
|
48 | + $item = $item ?: $manager->getPermission($name); |
|
49 | 49 | $manager->assign($item, $this->id); |
50 | 50 | $success++; |
51 | 51 | } catch (\Exception $exc) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | foreach ($items as $name) { |
69 | 69 | try { |
70 | 70 | $item = $manager->getRole($name); |
71 | - $item = $item ? : $manager->getPermission($name); |
|
71 | + $item = $item ?: $manager->getPermission($name); |
|
72 | 72 | $manager->revoke($item, $this->id); |
73 | 73 | $success++; |
74 | 74 | } catch (\Exception $exc) { |
@@ -117,7 +117,7 @@ |
||
117 | 117 | } |
118 | 118 | $expire = Yii::$app->params['user.passwordResetTokenExpire']; |
119 | 119 | $parts = explode('_', $token); |
120 | - $timestamp = (int) end($parts); |
|
120 | + $timestamp = (int)end($parts); |
|
121 | 121 | return $timestamp + $expire >= time(); |
122 | 122 | } |
123 | 123 |