From 74ea4d19b829738f66f6778536532257b44069c8 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 23 May 2014 14:04:36 +0200 Subject: [PATCH] modules/doc: Rename populateView() to renderDocAndToc() Rename populateView() to renderDocAndToc() since the method now sets the viewHelper to docandtoc.phtml refs #4820 --- .../views/scripts/partials/docandtoc.phtml | 33 ++++++++++--------- modules/doc/library/Doc/Controller.php | 4 ++- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/modules/doc/application/views/scripts/partials/docandtoc.phtml b/modules/doc/application/views/scripts/partials/docandtoc.phtml index 704e5ef88..46f7b0bfe 100644 --- a/modules/doc/application/views/scripts/partials/docandtoc.phtml +++ b/modules/doc/application/views/scripts/partials/docandtoc.phtml @@ -1,19 +1,20 @@ +

documentation

-

No documentation available.

+

Documentation not available.

-
- partial( - 'layout/menu.phtml', - 'default', - array( - 'items' => $docToc->getChildren(), - 'sub' => false, - 'url' => '' - ) - ); - ?> -
-
- -
+
+partial( + 'layout/menu.phtml', + 'default', + array( + 'items' => $docToc->getChildren(), + 'sub' => false, + 'url' => '' + ) + ); +?> +
+
+ +
diff --git a/modules/doc/library/Doc/Controller.php b/modules/doc/library/Doc/Controller.php index 840011150..ae5bc177f 100644 --- a/modules/doc/library/Doc/Controller.php +++ b/modules/doc/library/Doc/Controller.php @@ -13,11 +13,13 @@ class Controller extends ActionController * * @param string $module Name of the module for which to populate doc and toc. `null` for Icinga Web 2's doc */ - protected function populateView($module = null) + protected function renderDocAndToc($module = null) { $parser = new DocParser($module); 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); } }