Doc: Add action to view a chapter of a module's documentation

Note that the FULL documentation is displayed yet.

refs #4820
This commit is contained in:
Eric Lippmann 2014-05-27 15:09:01 +02:00
parent e78d98a607
commit 178402b65c
1 changed files with 17 additions and 0 deletions

View File

@ -47,4 +47,21 @@ class Doc_ModuleController extends DocController
$moduleManager = Icinga::app()->getModuleManager();
$this->renderToc($moduleManager->getModuleDir($moduleName, '/doc'), $moduleName);
}
/**
* View a chapter of a module's documentation
*
* @throws Zend_Controller_Action_Exception
*/
public function chapterAction()
{
$moduleName = $this->getParam('moduleName');
$this->assertModuleEnabled($moduleName);
$chapterName = $this->getParam('chapterName');
if ($chapterName === null) {
throw new Zend_Controller_Action_Exception('Missing parameter "chapterName"', 404);
}
$moduleManager = Icinga::app()->getModuleManager();
$this->renderChapter($chapterName, $moduleManager->getModuleDir($moduleName, '/doc'));
}
}