Doc: Add `DocController::renderToc()' method

refs #4820
This commit is contained in:
Eric Lippmann 2014-05-27 14:49:32 +02:00
parent 71615151a4
commit 884e4c8e94
1 changed files with 15 additions and 0 deletions

View File

@ -22,4 +22,19 @@ class DocController extends ActionController
$this->view->docName = $module === null ? 'Icinga Web 2' : ucfirst($module);
$this->_helper->viewRenderer('partials/docandtoc', null, true);
}
/**
* Render a toc
*
* @param string $path Path to the documentation
* @param string
*/
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);
}
}