protected function _render()
{
$sidebar = $GLOBALS['injector']->getInstance('Horde_View_Sidebar');
foreach ($this->_menu as $m) {
/* Check for separators. */
if ($m == 'separator') {
continue;
}
$row = array('cssClass' => $m['icon'], 'url' => $m['url'], 'label' => $m['text'], 'target' => $m['target'], 'onclick' => $m['onclick']);
/* Item class and selected indication. */
if (!isset($m['class'])) {
/* Try to match the item's path against the current
* script filename as well as other possible URLs to
* this script. */
if ($this->isSelected($m['url'])) {
$row['selected'] = true;
}
} elseif ($m['class'] === '__noselection') {
unset($m['class']);
} elseif ($m['class'] === 'current') {
$row['selected'] = true;
} else {
$row['class'] = $m['class'];
}
$sidebar->addRow($row);
}
return $sidebar;
}