mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Doc: Add action to display a chapter of Icinga Web 2's documentation
Note that the FULL documentation is displayed yet. refs #4820
This commit is contained in:
parent
dad7dc9e6c
commit
e78d98a607
@ -2,6 +2,7 @@
|
|||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
|
||||||
|
use \Zend_Controller_Action_Exception;
|
||||||
use Icinga\Application\Icinga;
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Module\Doc\DocController;
|
use Icinga\Module\Doc\DocController;
|
||||||
|
|
||||||
@ -14,4 +15,18 @@ class Doc_IcingawebController extends DocController
|
|||||||
{
|
{
|
||||||
$this->renderToc(Icinga::app()->getApplicationDir('/../doc'), 'Icinga Web 2');
|
$this->renderToc(Icinga::app()->getApplicationDir('/../doc'), 'Icinga Web 2');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View a chapter of Icinga Web 2's documentation
|
||||||
|
*
|
||||||
|
* @throws Zend_Controller_Action_Exception
|
||||||
|
*/
|
||||||
|
public function chapterAction()
|
||||||
|
{
|
||||||
|
$chapterName = $this->getParam('chapterName');
|
||||||
|
if ($chapterName === null) {
|
||||||
|
throw new Zend_Controller_Action_Exception('Missing parameter "chapterName"', 404);
|
||||||
|
}
|
||||||
|
$this->renderChapter($chapterName, Icinga::app()->getApplicationDir('/../doc'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user