Doc: Rename `DocController::renderDocAndToc()' to `renderChapter()'

Prepare that every chapter is displayed on a new page.

refs #4820
This commit is contained in:
Eric Lippmann 2014-05-27 15:06:48 +02:00
parent 282af5a794
commit dad7dc9e6c
1 changed files with 8 additions and 9 deletions

View File

@ -9,25 +9,24 @@ use Icinga\Web\Controller\ActionController;
class DocController extends ActionController
{
/**
* Publish doc HTML and toc to the view
* Render a chapter
*
* @param string $module Name of the module for which to populate doc and toc. `null` for Icinga Web 2's doc
* @param string $chapterName Name of the chapter
* @param string $path Path to the documentation
*/
protected function renderDocAndToc($module = null)
protected function renderChapter($chapterName, $path)
{
$parser = new DocParser($module);
$parser = new DocParser($path);
list($docHtml, $docToc) = $parser->getDocAndToc();
$this->view->docHtml = $docHtml;
$this->view->docToc = $docToc;
$this->view->docName = $module === null ? 'Icinga Web 2' : ucfirst($module);
$this->_helper->viewRenderer('partials/docandtoc', null, true);
$this->view->chapterHtml = $docHtml;
$this->_helper->viewRenderer('partials/chapter', null, true);
}
/**
* Render a toc
*
* @param string $path Path to the documentation
* @param string
* @param string $name Name of the documentation
*/
protected function renderToc($path, $name)
{