@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | <input id="inp-route" type="text" class="form-control" |
| 28 | 28 | placeholder="<?= Yii::t('rbac-admin', 'New route(s)') ?>"> |
| 29 | 29 | <span class="input-group-btn"> |
| 30 | - <?= Html::a(Yii::t('rbac-admin', 'Add') . $animateIcon, ['create'], [ |
|
| 30 | + <?= Html::a(Yii::t('rbac-admin', 'Add').$animateIcon, ['create'], [ |
|
| 31 | 31 | 'class' => 'btn btn-success', |
| 32 | 32 | 'id' => 'btn-new' |
| 33 | 33 | ]) ?> |
@@ -52,12 +52,12 @@ discard block |
||
| 52 | 52 | </div> |
| 53 | 53 | <div class="col-sm-1"> |
| 54 | 54 | <br><br> |
| 55 | - <?= Html::a('>>' . $animateIcon, ['assign'], [ |
|
| 55 | + <?= Html::a('>>'.$animateIcon, ['assign'], [ |
|
| 56 | 56 | 'class' => 'btn btn-success btn-assign', |
| 57 | 57 | 'data-target' => 'avaliable', |
| 58 | 58 | 'title' => Yii::t('rbac-admin', 'Assign') |
| 59 | 59 | ]) ?><br><br> |
| 60 | - <?= Html::a('<<' . $animateIcon, ['remove'], [ |
|
| 60 | + <?= Html::a('<<'.$animateIcon, ['remove'], [ |
|
| 61 | 61 | 'class' => 'btn btn-danger btn-assign', |
| 62 | 62 | 'data-target' => 'assigned', |
| 63 | 63 | 'title' => Yii::t('rbac-admin', 'Remove') |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | $baseDir = ''; |
| 11 | 11 | $this->title = substr($page, 0, strrpos($page, '.')); |
| 12 | 12 | } else { |
| 13 | - $baseDir = substr($page, 0, $pos) . '/'; |
|
| 13 | + $baseDir = substr($page, 0, $pos).'/'; |
|
| 14 | 14 | $this->title = substr($page, $pos + 1, strrpos($page, '.') - $pos - 1); |
| 15 | 15 | } |
| 16 | 16 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $url = Url::to($menu['url'], true); |
| 23 | 23 | $links[] = "[**{$menu['label']}**]({$url})"; |
| 24 | 24 | } |
| 25 | - $body = str_replace(':smile:.', ".\n\n" . implode(' ', $links) . "\n", $this->render("@mdm/admin/README.md")); |
|
| 25 | + $body = str_replace(':smile:.', ".\n\n".implode(' ', $links)."\n", $this->render("@mdm/admin/README.md")); |
|
| 26 | 26 | } else { |
| 27 | 27 | $body = $this->render("@mdm/admin/{$page}"); |
| 28 | 28 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | if ($link[0] == '/') { |
| 34 | 34 | $link = Url::current(['page' => ltrim($link, '/')], true); |
| 35 | 35 | } else { |
| 36 | - $link = Url::current(['page' => $baseDir . $link], true); |
|
| 36 | + $link = Url::current(['page' => $baseDir.$link], true); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | return "]($link)"; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | public function getMenus() |
| 119 | 119 | { |
| 120 | 120 | if ($this->_normalizeMenus === null) { |
| 121 | - $mid = '/' . $this->getUniqueId() . '/'; |
|
| 121 | + $mid = '/'.$this->getUniqueId().'/'; |
|
| 122 | 122 | // resolve core menus |
| 123 | 123 | $this->_normalizeMenus = []; |
| 124 | 124 | |
@@ -130,11 +130,11 @@ discard block |
||
| 130 | 130 | ]; |
| 131 | 131 | foreach ($this->_coreItems as $id => $lable) { |
| 132 | 132 | if (!isset($conditions[$id]) || $conditions[$id]) { |
| 133 | - $this->_normalizeMenus[$id] = ['label' => Yii::t('rbac-admin', $lable), 'url' => [$mid . $id]]; |
|
| 133 | + $this->_normalizeMenus[$id] = ['label' => Yii::t('rbac-admin', $lable), 'url' => [$mid.$id]]; |
|
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | foreach (array_keys($this->controllerMap) as $id) { |
| 137 | - $this->_normalizeMenus[$id] = ['label' => Yii::t('rbac-admin', Inflector::humanize($id)), 'url' => [$mid . $id]]; |
|
| 137 | + $this->_normalizeMenus[$id] = ['label' => Yii::t('rbac-admin', Inflector::humanize($id)), 'url' => [$mid.$id]]; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | // user configure menus |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $this->_normalizeMenus[$id] = isset($this->_normalizeMenus[$id]) ? array_merge($this->_normalizeMenus[$id], $value) |
| 150 | 150 | : $value; |
| 151 | 151 | if (!isset($this->_normalizeMenus[$id]['url'])) { |
| 152 | - $this->_normalizeMenus[$id]['url'] = [$mid . $id]; |
|
| 152 | + $this->_normalizeMenus[$id]['url'] = [$mid.$id]; |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | $view->params['breadcrumbs'][] = [ |
| 179 | 179 | 'label' => ($this->defaultUrlLabel ?: Yii::t('rbac-admin', 'Admin')), |
| 180 | - 'url' => ['/' . ($this->defaultUrl ?: $this->uniqueId)] |
|
| 180 | + 'url' => ['/'.($this->defaultUrl ?: $this->uniqueId)] |
|
| 181 | 181 | ]; |
| 182 | 182 | return true; |
| 183 | 183 | } |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Yii; |
| 6 | 6 | use yii\helpers\Inflector; |
| 7 | -use yii\helpers\ArrayHelper; |
|
| 8 | 7 | |
| 9 | 8 | /** |
| 10 | 9 | * GUI manager for RBAC. |