doc: Set parameters from route explicitly

refs #9817
This commit is contained in:
Eric Lippmann 2015-08-04 12:48:53 +02:00
parent ceb32679d8
commit 5ae21fd196
1 changed files with 15 additions and 0 deletions

View File

@ -9,6 +9,21 @@ use Icinga\Web\Controller;
class DocController extends Controller class DocController extends Controller
{ {
/**
* {@inheritdoc}
*/
protected function moduleInit()
{
// Our UrlParams object does not take parameters from custom routes into account which is why we have to set
// them explicitly
if ($this->hasParam('chapter')) {
$this->params->set('chapter', $this->getParam('chapter'));
}
if ($this->hasParam('moduleName')) {
$this->params->set('moduleName', $this->getParam('moduleName'));
}
}
/** /**
* Render a chapter * Render a chapter
* *