mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
Doc: Fix detection whether documentation is empty
This commit is contained in:
parent
720e022bea
commit
dad9538496
@ -84,4 +84,14 @@ class TreeNodeIterator implements RecursiveIterator
|
|||||||
{
|
{
|
||||||
return new static($this->current());
|
return new static($this->current());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get whether the iterator is empty
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isEmpty()
|
||||||
|
{
|
||||||
|
return empty($this->children);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ class DocTocRenderer extends DocRenderer
|
|||||||
*/
|
*/
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
if (empty($this->content)) {
|
if ($this->getInnerIterator()->isEmpty()) {
|
||||||
return '<p>' . mt('doc', 'Documentation is empty.') . '</p>';
|
return '<p>' . mt('doc', 'Documentation is empty.') . '</p>';
|
||||||
}
|
}
|
||||||
$view = $this->getView();
|
$view = $this->getView();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user