@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function getViewPath() |
| 151 | 151 | { |
| 152 | - return $this->module->getViewPath() . DIRECTORY_SEPARATOR . 'item'; |
|
| 152 | + return $this->module->getViewPath().DIRECTORY_SEPARATOR.'item'; |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | /** |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | public function labels() |
| 160 | 160 | { |
| 161 | - throw new NotSupportedException(get_class($this) . ' does not support labels().'); |
|
| 161 | + throw new NotSupportedException(get_class($this).' does not support labels().'); |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | while (($pos = strrpos($r, '/')) > 0) { |
| 122 | 122 | $r = substr($r, 0, $pos); |
| 123 | - if ($user->can($r . '/*', $params)) { |
|
| 123 | + if ($user->can($r.'/*', $params)) { |
|
| 124 | 124 | return true; |
| 125 | 125 | } |
| 126 | 126 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | } |
| 133 | 133 | while (($pos = strrpos($r, '/')) > 0) { |
| 134 | 134 | $r = substr($r, 0, $pos); |
| 135 | - if (isset($routes[$r . '/*'])) { |
|
| 135 | + if (isset($routes[$r.'/*'])) { |
|
| 136 | 136 | return true; |
| 137 | 137 | } |
| 138 | 138 | } |
@@ -143,15 +143,15 @@ discard block |
||
| 143 | 143 | protected static function normalizeRoute($route) |
| 144 | 144 | { |
| 145 | 145 | if ($route === '') { |
| 146 | - return '/' . Yii::$app->controller->getRoute(); |
|
| 146 | + return '/'.Yii::$app->controller->getRoute(); |
|
| 147 | 147 | } elseif (strncmp($route, '/', 1) === 0) { |
| 148 | 148 | return $route; |
| 149 | 149 | } elseif (strpos($route, '/') === false) { |
| 150 | - return '/' . Yii::$app->controller->getUniqueId() . '/' . $route; |
|
| 150 | + return '/'.Yii::$app->controller->getUniqueId().'/'.$route; |
|
| 151 | 151 | } elseif (($mid = Yii::$app->controller->module->getUniqueId()) !== '') { |
| 152 | - return '/' . $mid . '/' . $route; |
|
| 152 | + return '/'.$mid.'/'.$route; |
|
| 153 | 153 | } |
| 154 | - return '/' . $route; |
|
| 154 | + return '/'.$route; |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | /** |
@@ -220,7 +220,7 @@ discard block |
||
| 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 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $actionId = $action->getUniqueId(); |
| 69 | 69 | $user = $this->getUser(); |
| 70 | - if (Helper::checkRoute('/' . $actionId, Yii::$app->getRequest()->get(), $user)) { |
|
| 70 | + if (Helper::checkRoute('/'.$actionId, Yii::$app->getRequest()->get(), $user)) { |
|
| 71 | 71 | return true; |
| 72 | 72 | } |
| 73 | 73 | $this->denyAccess($user); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | // convert action uniqueId into an ID relative to the module |
| 109 | 109 | $mid = $this->owner->getUniqueId(); |
| 110 | 110 | $id = $uniqueId; |
| 111 | - if ($mid !== '' && strpos($id, $mid . '/') === 0) { |
|
| 111 | + if ($mid !== '' && strpos($id, $mid.'/') === 0) { |
|
| 112 | 112 | $id = substr($id, strlen($mid) + 1); |
| 113 | 113 | } |
| 114 | 114 | } else { |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | if (strpos($route, $prefix) !== 0) { |
| 102 | 102 | if (substr($route, -1) === '/') { |
| 103 | 103 | $prefix = $route; |
| 104 | - $filter1[] = $route . '%'; |
|
| 104 | + $filter1[] = $route.'%'; |
|
| 105 | 105 | } else { |
| 106 | 106 | $filter2[] = $route; |
| 107 | 107 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', 'Users'), 'url' => ['index']]; |
| 12 | 12 | $this->params['breadcrumbs'][] = $this->title; |
| 13 | 13 | |
| 14 | -$controllerId = $this->context->uniqueId . '/'; |
|
| 14 | +$controllerId = $this->context->uniqueId.'/'; |
|
| 15 | 15 | ?> |
| 16 | 16 | <div class="user-view"> |
| 17 | 17 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | <p> |
| 21 | 21 | <?php |
| 22 | - if ($model->status == 0 && Helper::checkRoute($controllerId . 'activate')) { |
|
| 22 | + if ($model->status == 0 && Helper::checkRoute($controllerId.'activate')) { |
|
| 23 | 23 | echo Html::a(Yii::t('rbac-admin', 'Activate'), ['activate', 'id' => $model->id], [ |
| 24 | 24 | 'class' => 'btn btn-primary', |
| 25 | 25 | 'data' => [ |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | } |
| 31 | 31 | ?> |
| 32 | 32 | <?php |
| 33 | - if (Helper::checkRoute($controllerId . 'delete')) { |
|
| 33 | + if (Helper::checkRoute($controllerId.'delete')) { |
|
| 34 | 34 | echo Html::a(Yii::t('rbac-admin', 'Delete'), ['delete', 'id' => $model->id], [ |
| 35 | 35 | 'class' => 'btn btn-danger', |
| 36 | 36 | 'data' => [ |
@@ -12,11 +12,11 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | $userName = $model->{$usernameField}; |
| 14 | 14 | if (!empty($fullnameField)) { |
| 15 | - $userName .= ' (' . ArrayHelper::getValue($model, $fullnameField) . ')'; |
|
| 15 | + $userName .= ' ('.ArrayHelper::getValue($model, $fullnameField).')'; |
|
| 16 | 16 | } |
| 17 | 17 | $userName = Html::encode($userName); |
| 18 | 18 | |
| 19 | -$this->title = Yii::t('rbac-admin', 'Assignment') . ' : ' . $userName; |
|
| 19 | +$this->title = Yii::t('rbac-admin', 'Assignment').' : '.$userName; |
|
| 20 | 20 | |
| 21 | 21 | $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', 'Assignments'), 'url' => ['index']]; |
| 22 | 22 | $this->params['breadcrumbs'][] = $userName; |
@@ -42,12 +42,12 @@ discard block |
||
| 42 | 42 | </div> |
| 43 | 43 | <div class="col-sm-1"> |
| 44 | 44 | <br><br> |
| 45 | - <?= Html::a('>>' . $animateIcon, ['assign', 'id' => (string)$model->id], [ |
|
| 45 | + <?= Html::a('>>'.$animateIcon, ['assign', 'id' => (string)$model->id], [ |
|
| 46 | 46 | 'class' => 'btn btn-success btn-assign', |
| 47 | 47 | 'data-target' => 'avaliable', |
| 48 | 48 | 'title' => Yii::t('rbac-admin', 'Assign') |
| 49 | 49 | ]) ?><br><br> |
| 50 | - <?= Html::a('<<' . $animateIcon, ['revoke', 'id' => (string)$model->id], [ |
|
| 50 | + <?= Html::a('<<'.$animateIcon, ['revoke', 'id' => (string)$model->id], [ |
|
| 51 | 51 | 'class' => 'btn btn-danger btn-assign', |
| 52 | 52 | 'data-target' => 'assigned', |
| 53 | 53 | 'title' => Yii::t('rbac-admin', 'Remove') |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | /* @var $this yii\web\View */ |
| 6 | 6 | /* @var $model mdm\admin\models\BizRule */ |
| 7 | 7 | |
| 8 | -$this->title = Yii::t('rbac-admin', 'Update Rule') . ': ' . $model->name; |
|
| 8 | +$this->title = Yii::t('rbac-admin', 'Update Rule').': '.$model->name; |
|
| 9 | 9 | $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', 'Rules'), 'url' => ['index']]; |
| 10 | 10 | $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->name]]; |
| 11 | 11 | $this->params['breadcrumbs'][] = Yii::t('rbac-admin', 'Update'); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | <div class="role-index"> |
| 22 | 22 | <h1><?= Html::encode($this->title) ?></h1> |
| 23 | 23 | <p> |
| 24 | - <?= Html::a(Yii::t('rbac-admin', 'Create ' . $labels['Item']), ['create'], ['class' => 'btn btn-success']) ?> |
|
| 24 | + <?= Html::a(Yii::t('rbac-admin', 'Create '.$labels['Item']), ['create'], ['class' => 'btn btn-success']) ?> |
|
| 25 | 25 | </p> |
| 26 | 26 | <?= |
| 27 | 27 | GridView::widget([ |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | 'attribute' => 'description', |
| 43 | 43 | 'label' => Yii::t('rbac-admin', 'Description'), |
| 44 | 44 | ], |
| 45 | - ['class' => 'yii\grid\ActionColumn',], |
|
| 45 | + ['class' => 'yii\grid\ActionColumn', ], |
|
| 46 | 46 | ], |
| 47 | 47 | ]) |
| 48 | 48 | ?> |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | $context = $this->context; |
| 10 | 10 | $labels = $context->labels(); |
| 11 | -$this->title = Yii::t('rbac-admin', 'Update ' . $labels['Item']) . ': ' . $model->name; |
|
| 11 | +$this->title = Yii::t('rbac-admin', 'Update '.$labels['Item']).': '.$model->name; |
|
| 12 | 12 | $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', $labels['Items']), 'url' => ['index']]; |
| 13 | 13 | $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->name]]; |
| 14 | 14 | $this->params['breadcrumbs'][] = Yii::t('rbac-admin', 'Update'); |