Commit 707e4e81 by Qiang Xue

fixed typo. [skip ci]

parent 2fb70cf0
...@@ -118,12 +118,10 @@ class Module extends \yii\base\Module implements BootstrapInterface ...@@ -118,12 +118,10 @@ class Module extends \yii\base\Module implements BootstrapInterface
$app->getView()->on(View::EVENT_END_BODY, [$this, 'renderToolbar']); $app->getView()->on(View::EVENT_END_BODY, [$this, 'renderToolbar']);
}); });
$app->getUrlManager()->addRules( $app->getUrlManager()->addRules([
[ $this->id => $this->id,
$this->id => $this->id, $this->id . '/<controller:\w+>/<action:\w+>' => $this->id . '/<controller>/<action>',
$this->id . '/<controller:\w+>/<action:\w+>' => $this->id . '/<controller>/<action>', ], false);
]
);
} }
/** /**
......
...@@ -84,13 +84,11 @@ class Module extends \yii\base\Module implements BootstrapInterface ...@@ -84,13 +84,11 @@ class Module extends \yii\base\Module implements BootstrapInterface
*/ */
public function bootstrap($app) public function bootstrap($app)
{ {
$app->getUrlManager()->addRules( $app->getUrlManager()->addRules([
[ $this->id => $this->id . '/default/index',
$this->id => $this->id . '/default/index', $this->id . '/<id:\w+>' => $this->id . '/default/view',
$this->id . '/<id:\w+>' => $this->id . '/default/view', $this->id . '/<controller:\w+>/<action:\w+>' => $this->id . '/<controller>/<action>',
$this->id . '/<controller:\w+>/<action:\w+>' => $this->id . '/<controller>/<action>', ], false);
]
);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment