Fixes #3088: The debug and gii modules will manage their own URL rules now

This commit is contained in:
Qiang Xue
2014-04-17 20:42:50 -04:00
parent 507a6f1068
commit 520011fff6
12 changed files with 109 additions and 63 deletions

View File

@@ -117,6 +117,13 @@ class Module extends \yii\base\Module implements BootstrapInterface
$app->on(Application::EVENT_BEFORE_REQUEST, function () use ($app) {
$app->getView()->on(View::EVENT_END_BODY, [$this, 'renderToolbar']);
});
$app->getUrlManager()->addRules(
[
$this->id => $this->id,
$this->id . '/<controller:\w+>/<action:\w+>' => $this->id . '/<controller>/<action>',
]
);
}
/**