@@ -26,15 +26,15 @@ discard block |
||
| 26 | 26 | $animateIcon = ' <i class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></i>'; |
| 27 | 27 | ?> |
| 28 | 28 | <div class="auth-item-view"> |
| 29 | - <h1><?=Html::encode($this->title);?></h1> |
|
| 29 | + <h1><?=Html::encode($this->title); ?></h1> |
|
| 30 | 30 | <p> |
| 31 | - <?=Html::a(Yii::t('rbac-admin', 'Update'), ['update', 'id' => $model->name], ['class' => 'btn btn-primary']);?> |
|
| 31 | + <?=Html::a(Yii::t('rbac-admin', 'Update'), ['update', 'id' => $model->name], ['class' => 'btn btn-primary']); ?> |
|
| 32 | 32 | <?=Html::a(Yii::t('rbac-admin', 'Delete'), ['delete', 'id' => $model->name], [ |
| 33 | 33 | 'class' => 'btn btn-danger', |
| 34 | 34 | 'data-confirm' => Yii::t('rbac-admin', 'Are you sure to delete this item?'), |
| 35 | 35 | 'data-method' => 'post', |
| 36 | -]);?> |
|
| 37 | - <?=Html::a(Yii::t('rbac-admin', 'Create'), ['create'], ['class' => 'btn btn-success']);?> |
|
| 36 | +]); ?> |
|
| 37 | + <?=Html::a(Yii::t('rbac-admin', 'Create'), ['create'], ['class' => 'btn btn-success']); ?> |
|
| 38 | 38 | </p> |
| 39 | 39 | <div class="row"> |
| 40 | 40 | <div class="col-sm-11"> |
@@ -55,25 +55,25 @@ discard block |
||
| 55 | 55 | <div class="row"> |
| 56 | 56 | <div class="col-sm-5"> |
| 57 | 57 | <input class="form-control search" data-target="available" |
| 58 | - placeholder="<?=Yii::t('rbac-admin', 'Search for available');?>"> |
|
| 58 | + placeholder="<?=Yii::t('rbac-admin', 'Search for available'); ?>"> |
|
| 59 | 59 | <select multiple size="20" class="form-control list" data-target="available"></select> |
| 60 | 60 | </div> |
| 61 | 61 | <div class="col-sm-1"> |
| 62 | 62 | <br><br> |
| 63 | - <?=Html::a('>>' . $animateIcon, ['assign', 'id' => $model->name], [ |
|
| 63 | + <?=Html::a('>>'.$animateIcon, ['assign', 'id' => $model->name], [ |
|
| 64 | 64 | 'class' => 'btn btn-success btn-assign', |
| 65 | 65 | 'data-target' => 'available', |
| 66 | 66 | 'title' => Yii::t('rbac-admin', 'Assign'), |
| 67 | -]);?><br><br> |
|
| 68 | - <?=Html::a('<<' . $animateIcon, ['remove', 'id' => $model->name], [ |
|
| 67 | +]); ?><br><br> |
|
| 68 | + <?=Html::a('<<'.$animateIcon, ['remove', 'id' => $model->name], [ |
|
| 69 | 69 | 'class' => 'btn btn-danger btn-assign', |
| 70 | 70 | 'data-target' => 'assigned', |
| 71 | 71 | 'title' => Yii::t('rbac-admin', 'Remove'), |
| 72 | -]);?> |
|
| 72 | +]); ?> |
|
| 73 | 73 | </div> |
| 74 | 74 | <div class="col-sm-5"> |
| 75 | 75 | <input class="form-control search" data-target="assigned" |
| 76 | - placeholder="<?=Yii::t('rbac-admin', 'Search for assigned');?>"> |
|
| 76 | + placeholder="<?=Yii::t('rbac-admin', 'Search for assigned'); ?>"> |
|
| 77 | 77 | <select multiple size="20" class="form-control list" data-target="assigned"></select> |
| 78 | 78 | </div> |
| 79 | 79 | </div> |
@@ -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; |
@@ -31,31 +31,31 @@ discard block |
||
| 31 | 31 | $animateIcon = ' <i class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></i>'; |
| 32 | 32 | ?> |
| 33 | 33 | <div class="assignment-index"> |
| 34 | - <h1><?=$this->title;?></h1> |
|
| 34 | + <h1><?=$this->title; ?></h1> |
|
| 35 | 35 | |
| 36 | 36 | <div class="row"> |
| 37 | 37 | <div class="col-sm-5"> |
| 38 | 38 | <input class="form-control search" data-target="available" |
| 39 | - placeholder="<?=Yii::t('rbac-admin', 'Search for available');?>"> |
|
| 39 | + placeholder="<?=Yii::t('rbac-admin', 'Search for available'); ?>"> |
|
| 40 | 40 | <select multiple size="20" class="form-control list" data-target="available"> |
| 41 | 41 | </select> |
| 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' => 'available', |
| 48 | 48 | 'title' => Yii::t('rbac-admin', 'Assign'), |
| 49 | -]);?><br><br> |
|
| 50 | - <?=Html::a('<<' . $animateIcon, ['revoke', 'id' => (string) $model->id], [ |
|
| 49 | +]); ?><br><br> |
|
| 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'), |
| 54 | -]);?> |
|
| 54 | +]); ?> |
|
| 55 | 55 | </div> |
| 56 | 56 | <div class="col-sm-5"> |
| 57 | 57 | <input class="form-control search" data-target="assigned" |
| 58 | - placeholder="<?=Yii::t('rbac-admin', 'Search for assigned');?>"> |
|
| 58 | + placeholder="<?=Yii::t('rbac-admin', 'Search for assigned'); ?>"> |
|
| 59 | 59 | <select multiple size="20" class="form-control list" data-target="assigned"> |
| 60 | 60 | </select> |
| 61 | 61 | </div> |
@@ -20,17 +20,17 @@ discard block |
||
| 20 | 20 | $this->registerJs($this->render('_script.js')); |
| 21 | 21 | $animateIcon = ' <i class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></i>'; |
| 22 | 22 | ?> |
| 23 | -<h1><?=Html::encode($this->title);?></h1> |
|
| 23 | +<h1><?=Html::encode($this->title); ?></h1> |
|
| 24 | 24 | <div class="row"> |
| 25 | 25 | <div class="col-sm-11"> |
| 26 | 26 | <div class="input-group"> |
| 27 | 27 | <input id="inp-route" type="text" class="form-control" |
| 28 | - placeholder="<?=Yii::t('rbac-admin', 'New route(s)');?>"> |
|
| 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 | +]); ?> |
|
| 34 | 34 | </span> |
| 35 | 35 | </div> |
| 36 | 36 | </div> |
@@ -40,32 +40,32 @@ discard block |
||
| 40 | 40 | <div class="col-sm-5"> |
| 41 | 41 | <div class="input-group"> |
| 42 | 42 | <input class="form-control search" data-target="available" |
| 43 | - placeholder="<?=Yii::t('rbac-admin', 'Search for available');?>"> |
|
| 43 | + placeholder="<?=Yii::t('rbac-admin', 'Search for available'); ?>"> |
|
| 44 | 44 | <span class="input-group-btn"> |
| 45 | 45 | <?=Html::a('<span class="glyphicon glyphicon-refresh"></span>', ['refresh'], [ |
| 46 | 46 | 'class' => 'btn btn-default', |
| 47 | 47 | 'id' => 'btn-refresh', |
| 48 | -]);?> |
|
| 48 | +]); ?> |
|
| 49 | 49 | </span> |
| 50 | 50 | </div> |
| 51 | 51 | <select multiple size="20" class="form-control list" data-target="available"></select> |
| 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' => 'available', |
| 58 | 58 | 'title' => Yii::t('rbac-admin', 'Assign'), |
| 59 | -]);?><br><br> |
|
| 60 | - <?=Html::a('<<' . $animateIcon, ['remove'], [ |
|
| 59 | +]); ?><br><br> |
|
| 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'), |
| 64 | -]);?> |
|
| 64 | +]); ?> |
|
| 65 | 65 | </div> |
| 66 | 66 | <div class="col-sm-5"> |
| 67 | 67 | <input class="form-control search" data-target="assigned" |
| 68 | - placeholder="<?=Yii::t('rbac-admin', 'Search for assigned');?>"> |
|
| 68 | + placeholder="<?=Yii::t('rbac-admin', 'Search for assigned'); ?>"> |
|
| 69 | 69 | <select multiple size="20" class="form-control list" data-target="assigned"></select> |
| 70 | 70 | </div> |
| 71 | 71 | </div> |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | while (($pos = strrpos($r, '/')) > 0) { |
| 123 | 123 | $r = substr($r, 0, $pos); |
| 124 | - if ($user->can($r . '/*', $params)) { |
|
| 124 | + if ($user->can($r.'/*', $params)) { |
|
| 125 | 125 | return true; |
| 126 | 126 | } |
| 127 | 127 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | while (($pos = strrpos($r, '/')) > 0) { |
| 135 | 135 | $r = substr($r, 0, $pos); |
| 136 | - if (isset($routes[$r . '/*'])) { |
|
| 136 | + if (isset($routes[$r.'/*'])) { |
|
| 137 | 137 | return true; |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -150,19 +150,19 @@ discard block |
||
| 150 | 150 | protected static function normalizeRoute($route, $advanced = false) |
| 151 | 151 | { |
| 152 | 152 | if ($route === '') { |
| 153 | - $normalized = '/' . Yii::$app->controller->getRoute(); |
|
| 153 | + $normalized = '/'.Yii::$app->controller->getRoute(); |
|
| 154 | 154 | } elseif (strncmp($route, '/', 1) === 0) { |
| 155 | 155 | $normalized = $route; |
| 156 | 156 | } elseif (strpos($route, '/') === false) { |
| 157 | - $normalized = '/' . Yii::$app->controller->getUniqueId() . '/' . $route; |
|
| 157 | + $normalized = '/'.Yii::$app->controller->getUniqueId().'/'.$route; |
|
| 158 | 158 | } elseif (($mid = Yii::$app->controller->module->getUniqueId()) !== '') { |
| 159 | - $normalized = '/' . $mid . '/' . $route; |
|
| 159 | + $normalized = '/'.$mid.'/'.$route; |
|
| 160 | 160 | } else { |
| 161 | - $normalized = '/' . $route; |
|
| 161 | + $normalized = '/'.$route; |
|
| 162 | 162 | } |
| 163 | 163 | // Prefix @app-id to route. |
| 164 | 164 | if ($advanced) { |
| 165 | - $normalized = Route::PREFIX_ADVANCED . Yii::$app->id . $normalized; |
|
| 165 | + $normalized = Route::PREFIX_ADVANCED.Yii::$app->id.$normalized; |
|
| 166 | 166 | } |
| 167 | 167 | return $normalized; |
| 168 | 168 | } |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | } |
| 234 | 234 | return implode(' ', $result); |
| 235 | 235 | } |
| 236 | - return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($user) { |
|
| 236 | + return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($user) { |
|
| 237 | 237 | return static::checkRoute($matches[1], [], $user) ? "{{$matches[1]}}" : ''; |
| 238 | 238 | }, $buttons); |
| 239 | 239 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $r = explode('&', $route); |
| 39 | 39 | $item = $manager->createPermission($this->getPermissionName($route)); |
| 40 | 40 | if (count($r) > 1) { |
| 41 | - $action = '/' . trim($r[0], '/'); |
|
| 41 | + $action = '/'.trim($r[0], '/'); |
|
| 42 | 42 | if (($itemAction = $manager->getPermission($action)) === null) { |
| 43 | 43 | $itemAction = $manager->createPermission($action); |
| 44 | 44 | $manager->add($itemAction); |
@@ -101,9 +101,9 @@ discard block |
||
| 101 | 101 | public function getPermissionName($route) |
| 102 | 102 | { |
| 103 | 103 | if (self::PREFIX_BASIC == $this->routePrefix) { |
| 104 | - return self::PREFIX_BASIC . trim($route, self::PREFIX_BASIC); |
|
| 104 | + return self::PREFIX_BASIC.trim($route, self::PREFIX_BASIC); |
|
| 105 | 105 | } else { |
| 106 | - return self::PREFIX_ADVANCED . ltrim(trim($route, self::PREFIX_BASIC), self::PREFIX_ADVANCED); |
|
| 106 | + return self::PREFIX_ADVANCED.ltrim(trim($route, self::PREFIX_BASIC), self::PREFIX_ADVANCED); |
|
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | // Step through each configured application |
| 128 | 128 | foreach ($advanced as $id => $configPaths) { |
| 129 | 129 | // Force correct id string. |
| 130 | - $id = $this->routePrefix . ltrim(trim($id), $this->routePrefix); |
|
| 130 | + $id = $this->routePrefix.ltrim(trim($id), $this->routePrefix); |
|
| 131 | 131 | // Create empty config array. |
| 132 | 132 | $config = []; |
| 133 | 133 | // Assemble configuration for current app. |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | unset($app); |
| 145 | 145 | // Prepend the app id to all routes. |
| 146 | 146 | foreach ($r as $route) { |
| 147 | - $routes[$id . $route] = $id . $route; |
|
| 147 | + $routes[$id.$route] = $id.$route; |
|
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | // Switch back to original app. |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | */ |
| 205 | 205 | protected function getRouteRecursive($module, &$result) |
| 206 | 206 | { |
| 207 | - $token = "Get Route of '" . get_class($module) . "' with id '" . $module->uniqueId . "'"; |
|
| 207 | + $token = "Get Route of '".get_class($module)."' with id '".$module->uniqueId."'"; |
|
| 208 | 208 | Yii::beginProfile($token, __METHOD__); |
| 209 | 209 | try { |
| 210 | 210 | foreach ($module->getModules() as $id => $child) { |
@@ -217,9 +217,9 @@ discard block |
||
| 217 | 217 | $this->getControllerActions($type, $id, $module, $result); |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | - $namespace = trim($module->controllerNamespace, '\\') . '\\'; |
|
| 220 | + $namespace = trim($module->controllerNamespace, '\\').'\\'; |
|
| 221 | 221 | $this->getControllerFiles($module, $namespace, '', $result); |
| 222 | - $all = '/' . ltrim($module->uniqueId . '/*', '/'); |
|
| 222 | + $all = '/'.ltrim($module->uniqueId.'/*', '/'); |
|
| 223 | 223 | $result[$all] = $all; |
| 224 | 224 | } catch (\Exception $exc) { |
| 225 | 225 | Yii::error($exc->getMessage(), __METHOD__); |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | */ |
| 238 | 238 | protected function getControllerFiles($module, $namespace, $prefix, &$result) |
| 239 | 239 | { |
| 240 | - $path = Yii::getAlias('@' . str_replace('\\', '/', $namespace), false); |
|
| 240 | + $path = Yii::getAlias('@'.str_replace('\\', '/', $namespace), false); |
|
| 241 | 241 | $token = "Get controllers from '$path'"; |
| 242 | 242 | Yii::beginProfile($token, __METHOD__); |
| 243 | 243 | try { |
@@ -248,15 +248,15 @@ discard block |
||
| 248 | 248 | if ($file == '.' || $file == '..') { |
| 249 | 249 | continue; |
| 250 | 250 | } |
| 251 | - if (is_dir($path . '/' . $file) && preg_match('%^[a-z0-9_/]+$%i', $file . '/')) { |
|
| 252 | - $this->getControllerFiles($module, $namespace . $file . '\\', $prefix . $file . '/', $result); |
|
| 251 | + if (is_dir($path.'/'.$file) && preg_match('%^[a-z0-9_/]+$%i', $file.'/')) { |
|
| 252 | + $this->getControllerFiles($module, $namespace.$file.'\\', $prefix.$file.'/', $result); |
|
| 253 | 253 | } elseif (strcmp(substr($file, -14), 'Controller.php') === 0) { |
| 254 | 254 | $baseName = substr(basename($file), 0, -14); |
| 255 | 255 | $name = strtolower(preg_replace('/(?<![A-Z])[A-Z]/', ' \0', $baseName)); |
| 256 | 256 | $id = ltrim(str_replace(' ', '-', $name), '-'); |
| 257 | - $className = $namespace . $baseName . 'Controller'; |
|
| 257 | + $className = $namespace.$baseName.'Controller'; |
|
| 258 | 258 | if (strpos($className, '-') === false && class_exists($className) && is_subclass_of($className, 'yii\base\Controller')) { |
| 259 | - $this->getControllerActions($className, $prefix . $id, $module, $result); |
|
| 259 | + $this->getControllerActions($className, $prefix.$id, $module, $result); |
|
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | 262 | } |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | */ |
| 276 | 276 | protected function getControllerActions($type, $id, $module, &$result) |
| 277 | 277 | { |
| 278 | - $token = "Create controller with cofig=" . VarDumper::dumpAsString($type) . " and id='$id'"; |
|
| 278 | + $token = "Create controller with cofig=".VarDumper::dumpAsString($type)." and id='$id'"; |
|
| 279 | 279 | Yii::beginProfile($token, __METHOD__); |
| 280 | 280 | try { |
| 281 | 281 | /* @var $controller \yii\base\Controller */ |
@@ -296,19 +296,19 @@ discard block |
||
| 296 | 296 | */ |
| 297 | 297 | protected function getActionRoutes($controller, &$result) |
| 298 | 298 | { |
| 299 | - $token = "Get actions of controller '" . $controller->uniqueId . "'"; |
|
| 299 | + $token = "Get actions of controller '".$controller->uniqueId."'"; |
|
| 300 | 300 | Yii::beginProfile($token, __METHOD__); |
| 301 | 301 | try { |
| 302 | - $prefix = '/' . $controller->uniqueId . '/'; |
|
| 302 | + $prefix = '/'.$controller->uniqueId.'/'; |
|
| 303 | 303 | foreach ($controller->actions() as $id => $value) { |
| 304 | - $result[$prefix . $id] = $prefix . $id; |
|
| 304 | + $result[$prefix.$id] = $prefix.$id; |
|
| 305 | 305 | } |
| 306 | 306 | $class = new \ReflectionClass($controller); |
| 307 | 307 | foreach ($class->getMethods() as $method) { |
| 308 | 308 | $name = $method->getName(); |
| 309 | 309 | if ($method->isPublic() && !$method->isStatic() && strpos($name, 'action') === 0 && $name !== 'actions') { |
| 310 | 310 | $name = strtolower(preg_replace('/(?<![A-Z])[A-Z]/', ' \0', substr($name, 6))); |
| 311 | - $id = $prefix . ltrim(str_replace(' ', '-', $name), '-'); |
|
| 311 | + $id = $prefix.ltrim(str_replace(' ', '-', $name), '-'); |
|
| 312 | 312 | $result[$id] = $id; |
| 313 | 313 | } |
| 314 | 314 | } |
@@ -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", file_get_contents(Url::to('@mdm/admin/README.md'))); |
|
| 25 | + $body = str_replace(':smile:.', ".\n\n".implode(' ', $links)."\n", file_get_contents(Url::to('@mdm/admin/README.md'))); |
|
| 26 | 26 | } else { |
| 27 | 27 | $body = file_get_contents(Url::to("@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)"; |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | return [ |
| 62 | 62 | [['ruleName'], 'checkRule'], |
| 63 | 63 | [['name', 'type'], 'required'], |
| 64 | - [['name'], 'checkUnique', 'when' => function () { |
|
| 64 | + [['name'], 'checkUnique', 'when' => function() { |
|
| 65 | 65 | return $this->isNewRecord || ($this->_item->name != $this->name); |
| 66 | 66 | }], |
| 67 | 67 | [['type'], 'integer'], |