content[] = '';
}
/**
* {@inheritdoc}
*/
public function beginChildren()
{
$this->content[] = '
';
}
/**
* {@inheritdoc}
*/
public function endChildren()
{
$this->content[] = '
';
}
/**
* {@inheritdoc}
*/
public function render()
{
$view = $this->getView();
$zendUrlHelper = $view->getHelper('Url');
foreach ($this as $section) {
$path = $zendUrlHelper->url(
array_merge(
$this->urlParams,
array(
'chapter' => $this->encodeUrlParam($section->getChapter()->getId())
)
),
$this->url,
false,
false
);
$url = $view->url($path);
/** @type \Icinga\Web\Url $url */
$url->setAnchor($this->encodeAnchor($section->getId()));
$this->content[] = sprintf(
'%s',
$section->getNoFollow() ? 'rel="nofollow" ' : '',
$url->getAbsoluteUrl(),
$view->escape($section->getTitle())
);
if (! $section->hasChildren()) {
$this->content[] = '';
}
}
return implode("\n", $this->content);
}
}