Skip to content

Commit

Permalink
Allow to specifiy the sidebar container to use.
Browse files Browse the repository at this point in the history
Bug; 14581
  • Loading branch information
mrubinsk committed Feb 25, 2017
1 parent 74491a2 commit 35cf378
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions framework/Core/lib/Horde/Menu.php
Expand Up @@ -65,6 +65,8 @@ public function add($url, $text, $icon = '', $icon_path = null,
* 'target' - (string) HREF target parameter.
* 'text' - (string) Label.
* 'url' - (string) Hyperlink.
* 'container' - (string) Name of sidebar container to add to, if not the
* default.
* </pre>
*/
public function addArray($item)
Expand All @@ -86,7 +88,8 @@ public function addArray($item)
'icon_path' => null,
'onclick' => null,
'target' => '',
'text' => ''
'text' => '',
'container' => '',
), $item);
}

Expand Down Expand Up @@ -148,7 +151,11 @@ protected function _render()
$row['class'] = $m['class'];
}

$sidebar->addRow($row);
$container = !empty($m['container'])
? $m['container']
: '';

$sidebar->addRow($row, $container);
}

return $sidebar;
Expand Down

0 comments on commit 35cf378

Please sign in to comment.