mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
modules/doc: Rename populateView() to renderDocAndToc()
Rename populateView() to renderDocAndToc() since the method now sets the viewHelper to docandtoc.phtml refs #4820
This commit is contained in:
parent
99971e241c
commit
74ea4d19b8
@ -1,8 +1,9 @@
|
|||||||
|
<h1><?= $docName ?> documentation</h1>
|
||||||
<?php if ($docHtml === null): ?>
|
<?php if ($docHtml === null): ?>
|
||||||
<p>No documentation available.</p>
|
<p>Documentation not available.</p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="toc">
|
<div class="toc">
|
||||||
<?= $this->partial(
|
<?= $this->partial(
|
||||||
'layout/menu.phtml',
|
'layout/menu.phtml',
|
||||||
'default',
|
'default',
|
||||||
array(
|
array(
|
||||||
@ -11,9 +12,9 @@
|
|||||||
'url' => ''
|
'url' => ''
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="doc">
|
<div class="doc">
|
||||||
<?= $docHtml ?>
|
<?= $docHtml ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
@ -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
|
* @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);
|
$parser = new DocParser($module);
|
||||||
list($docHtml, $docToc) = $parser->getDocAndToc();
|
list($docHtml, $docToc) = $parser->getDocAndToc();
|
||||||
$this->view->docHtml = $docHtml;
|
$this->view->docHtml = $docHtml;
|
||||||
$this->view->docToc = $docToc;
|
$this->view->docToc = $docToc;
|
||||||
|
$this->view->docName = $module === null ? 'Icinga Web 2' : ucfirst($module);
|
||||||
|
$this->_helper->viewRenderer('partials/docandtoc', null, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user