2014-05-23 09:40:00 +02:00
|
|
|
<?php
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
|
2014-05-27 15:07:49 +02:00
|
|
|
use \Zend_Controller_Action_Exception;
|
2014-05-27 14:50:48 +02:00
|
|
|
use Icinga\Application\Icinga;
|
|
|
|
use Icinga\Module\Doc\DocController;
|
2014-05-23 09:40:00 +02:00
|
|
|
|
|
|
|
class Doc_IcingawebController extends DocController
|
|
|
|
{
|
2014-05-27 14:50:48 +02:00
|
|
|
/**
|
|
|
|
* View toc of Icinga Web 2's documentation
|
|
|
|
*/
|
|
|
|
public function tocAction()
|
2014-05-23 09:40:00 +02:00
|
|
|
{
|
2014-05-28 17:18:57 +02:00
|
|
|
$this->populateToc(Icinga::app()->getApplicationDir('/../doc'), 'Icinga Web 2');
|
2014-05-23 09:40:00 +02:00
|
|
|
}
|
2014-05-27 15:07:49 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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);
|
|
|
|
}
|
2014-06-06 14:10:35 +02:00
|
|
|
$this->populateChapter($chapterName, Icinga::app()->getApplicationDir('/../doc'));
|
2014-05-27 15:07:49 +02:00
|
|
|
}
|
2014-05-23 09:40:00 +02:00
|
|
|
}
|