original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Menulist populated with current items
  
  @param \Zend_Controller_Request_Abstract $request
  @param $parentLabel
  @return \Gems_Menu_MenuList
docstring_tokens: Menulist populated with current items