diff --git a/modules/doc/application/views/scripts/chapter.phtml b/modules/doc/application/views/scripts/chapter.phtml
index 4341967ba..eefe6f65f 100644
--- a/modules/doc/application/views/scripts/chapter.phtml
+++ b/modules/doc/application/views/scripts/chapter.phtml
@@ -2,5 +2,5 @@
= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?>
- = /** @type \Icinga\Module\Doc\DocSectionRenderer $section */ $section ?>
+ = /** @type \Icinga\Module\Doc\Renderer\DocSectionRenderer $section */ $section ?>
diff --git a/modules/doc/application/views/scripts/pdf.phtml b/modules/doc/application/views/scripts/pdf.phtml
index 72d77f3c0..e76ded957 100644
--- a/modules/doc/application/views/scripts/pdf.phtml
+++ b/modules/doc/application/views/scripts/pdf.phtml
@@ -1,7 +1,5 @@
-= $docName ?> = $this->translate('Documentation'); ?>
-
- = $tocRenderer->render($this, $this->getHelper('Url')); ?>
-
-
- = $sectionRenderer->render($this, $this->getHelper('Url')); ?>
+
+
= /** @type string $title */ $title ?>
+ = /** @type \Icinga\Module\Doc\Renderer\DocTocRenderer $toc */ $toc ?>
+ = /** @type \Icinga\Module\Doc\Renderer\DocSectionRenderer $section */ $section ?>
diff --git a/modules/doc/application/views/scripts/toc.phtml b/modules/doc/application/views/scripts/toc.phtml
index 09e3adf51..daec9b177 100644
--- a/modules/doc/application/views/scripts/toc.phtml
+++ b/modules/doc/application/views/scripts/toc.phtml
@@ -3,5 +3,5 @@
= /** @type string $title */ $title ?>
- = /** @type \Icinga\Module\Doc\DocTocRenderer $toc */ $toc ?>
+ = /** @type \Icinga\Module\Doc\Renderer\DocTocRenderer $toc */ $toc ?>
diff --git a/modules/doc/library/Doc/DocController.php b/modules/doc/library/Doc/DocController.php
index f555c2442..de02a3bae 100644
--- a/modules/doc/library/Doc/DocController.php
+++ b/modules/doc/library/Doc/DocController.php
@@ -45,7 +45,6 @@ class DocController extends ModuleActionController
->setUrl($url)
->setUrlParams($urlParams);
$name = ucfirst($name);
- $this->view->docName = $name;
$this->view->title = sprintf($this->translate('%s Documentation'), $name);
$this->render('toc', null, true);
}
@@ -61,17 +60,16 @@ class DocController extends ModuleActionController
protected function renderPdf($path, $name, $url, array $urlParams = array())
{
$parser = new DocParser($path);
- $docTree = $parser->getDocTree();
- $this->view->tocRenderer = new TocRenderer($docTree, $url, $urlParams);
- $this->view->sectionRenderer = new SectionRenderer(
- $docTree,
- null,
- null,
- $url,
- $urlParams
- );
- $this->view->docName = $name;
+ $toc = new DocTocRenderer($parser->getDocTree()->getIterator());
+ $this->view->toc = $toc
+ ->setUrl($url)
+ ->setUrlParams($urlParams);
+ $section = new DocSectionRenderer($parser->getDocTree());
+ $this->view->section = $section
+ ->setUrl($url)
+ ->setUrlParams($urlParams);
+ $this->view->title = sprintf($this->translate('%s Documentation'), $name);
$this->_request->setParam('format', 'pdf');
- $this->render('pdf', null, true);
+ $this->_helper->viewRenderer->setRender('pdf', null, true);
}
}