icingaweb2/modules/doc/library/Doc/DocController.php
Eric Lippmann dad7dc9e6c Doc: Rename DocController::renderDocAndToc()' to renderChapter()'
Prepare that every chapter is displayed on a new page.

refs #4820
2014-05-27 15:12:21 +02:00

40 lines
1.1 KiB
PHP

<?php
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Module\Doc;
use Icinga\Web\Controller\ActionController;
class DocController extends ActionController
{
/**
* Render a chapter
*
* @param string $chapterName Name of the chapter
* @param string $path Path to the documentation
*/
protected function renderChapter($chapterName, $path)
{
$parser = new DocParser($path);
list($docHtml, $docToc) = $parser->getDocAndToc();
$this->view->chapterHtml = $docHtml;
$this->_helper->viewRenderer('partials/chapter', null, true);
}
/**
* Render a toc
*
* @param string $path Path to the documentation
* @param string $name Name of the documentation
*/
protected function renderToc($path, $name)
{
$parser = new DocParser($path);
list($docHtml, $docToc) = $parser->getDocAndToc();
$this->view->docToc = $docToc;
$this->view->docName = $name;
$this->_helper->viewRenderer('partials/toc', null, true);
}
}