mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
doc: Remove DocTocHtmlRenderer as it's superseded by Data/Tree/NodeRenderer
refs #4820
This commit is contained in:
parent
cf987544c5
commit
625a6dae40
@ -1,45 +0,0 @@
|
|||||||
<?php
|
|
||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
|
||||||
// {{{ICINGA_LICENSE_HEADER}}
|
|
||||||
|
|
||||||
namespace Icinga\Module\Doc;
|
|
||||||
|
|
||||||
use RecursiveIteratorIterator;
|
|
||||||
|
|
||||||
class DocTocHtmlRenderer extends RecursiveIteratorIterator
|
|
||||||
{
|
|
||||||
protected $html = array();
|
|
||||||
|
|
||||||
public function __construct(DocToc $toc)
|
|
||||||
{
|
|
||||||
parent::__construct($toc, RecursiveIteratorIterator::SELF_FIRST);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function beginIteration()
|
|
||||||
{
|
|
||||||
$this->html[] = '<ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function endIteration()
|
|
||||||
{
|
|
||||||
$this->html[] = '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function beginChildren()
|
|
||||||
{
|
|
||||||
$this->html[] = '<ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function endChildren()
|
|
||||||
{
|
|
||||||
$this->html[] = '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function render($callback)
|
|
||||||
{
|
|
||||||
foreach ($this as $node) {
|
|
||||||
$this->html[] = $callback($node->getValue());
|
|
||||||
}
|
|
||||||
return implode("\n", $this->html);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user