public function addByController($controller, $action = 'index', $label = null)
    {
        $query['controller'] = $controller;
        $query['action']     = $action;

        if ($menuItem = $this->menu->findFirst($query)) {
            $this->addMenuItem($menuItem, $label);
        }

        return $this;
    }
public function addByController($controller, $action = 'index', $label = null)
    {
        $query['controller'] = $controller;
        $query['action']     = $action;

        if ($menuItem = $this->menu->findFirst($query)) {
            $this->addMenuItem($menuItem, $label);
        }

        return $this;
    }
public function addByController ( $ controller , $ action = 'index' , $ label = null ) { $ query [ 'controller' ] = $ controller ; $ query [ 'action' ] = $ action ; if ( $ menuItem = $ this -> menu -> findFirst ( $ query ) ) { $ this -> addMenuItem ( $ menuItem , $ label ) ; } return $ this ; }
Add a menu item by specifying the controller

@param string $controller Controller name
@param string $action Action name
@param string $label Optional alternative label
@return \Gems_Menu_MenuList (continuation pattern)
Add a menu item by specifying the controller