}
}
- function item($actionName, $args, $label, $description, $id=null, $cls=null)
+ function item($actionName, array $args, $label, $description, $id=null, $cls=null)
{
if (empty($id)) {
$id = $this->menuItemID($actionName, $args);
$cls);
}
- function isCurrent($actionName, $args)
+ function isCurrent($actionName, array $args)
{
if ($actionName != $this->actionName) {
return false;
return true;
}
-
+
function menuItemID($actionName, $args = null)
{
$id = sprintf('nav_%s', $actionName);
-
+
if (!is_null($args)) {
foreach ($args as $key => $value) {
$id .= '_' . $key . '_' . $value;
function submenu($label, $menu)
{
- $this->action->elementStart('li');
- $this->action->element('h3', null, $label);
- $menu->show();
- $this->action->elementEnd('li');
+ if (Event::handle('StartSubMenu', array($this->action, $menu, $label))) {
+ $this->action->elementStart('li');
+ $this->action->element('h3', null, $label);
+ $menu->show();
+ $this->action->elementEnd('li');
+ Event::handle('EndSubMenu', array($this->action, $menu, $label));
+ }
}
}