public function getCurrentMenuList(\Zend_Controller_Request_Abstract $request, $parentLabel = null)
    {
        $controller = $request->getControllerName();
        $action     = $request->getActionName();

        $menuList = $this->getMenuList();

        if ($controller !== 'index') {
            $menuList->addByController($controller, 'index', $parentLabel);
        }

        foreach ($this->getCurrent()->getChildren() as $child) {
            if ($child instanceof \Gems_Menu_SubMenuItem) {
                $chAction = $child->get('action');
                $chContr  = $child->get('controller');
                if (! ($controller == $chContr && $action == $chAction)) {
                    $menuList->addByController($chContr, $chAction);
                }
            }
        }
        return $menuList;
    }
public function getCurrentMenuList(\Zend_Controller_Request_Abstract $request, $parentLabel = null)
    {
        $controller = $request->getControllerName();
        $action     = $request->getActionName();

        $menuList = $this->getMenuList();

        if ($controller !== 'index') {
            $menuList->addByController($controller, 'index', $parentLabel);
        }

        foreach ($this->getCurrent()->getChildren() as $child) {
            if ($child instanceof \Gems_Menu_SubMenuItem) {
                $chAction = $child->get('action');
                $chContr  = $child->get('controller');
                if (! ($controller == $chContr && $action == $chAction)) {
                    $menuList->addByController($chContr, $chAction);
                }
            }
        }
        return $menuList;
    }
public function getCurrentMenuList ( \ Zend_Controller_Request_Abstract $ request , $ parentLabel = null ) { $ controller = $ request -> getControllerName ( ) ; $ action = $ request -> getActionName ( ) ; $ menuList = $ this -> getMenuList ( ) ; if ( $ controller !== 'index' ) { $ menuList -> addByController ( $ controller , 'index' , $ parentLabel ) ; } foreach ( $ this -> getCurrent ( ) -> getChildren ( ) as $ child ) { if ( $ child instanceof \ Gems_Menu_SubMenuItem ) { $ chAction = $ child -> get ( 'action' ) ; $ chContr = $ child -> get ( 'controller' ) ; if ( ! ( $ controller == $ chContr && $ action == $ chAction ) ) { $ menuList -> addByController ( $ chContr , $ chAction ) ; } } } return $ menuList ; }
Menulist populated with current items

@param \Zend_Controller_Request_Abstract $request
@param $parentLabel
@return \Gems_Menu_MenuList
Menulist populated with current items