original_string: public function addMenuItem(\Gems_Menu_SubMenuItem $menuItem, $label = null)
      {
          $key = $this->_getKey($menuItem->get('controller'), $menuItem->get('action'));
  
          if ($label) {
              $this->altLabels[$key] = $label;
          }
  
          $this->offsetSet($key, $menuItem);
          return $this;
      }
code: public function addMenuItem(\Gems_Menu_SubMenuItem $menuItem, $label = null)
      {
          $key = $this->_getKey($menuItem->get('controller'), $menuItem->get('action'));
  
          if ($label) {
              $this->altLabels[$key] = $label;
          }
  
          $this->offsetSet($key, $menuItem);
          return $this;
      }
code_tokens: public function addMenuItem ( \ Gems_Menu_SubMenuItem $ menuItem , $ label = null ) { $ key = $ this -> _getKey ( $ menuItem -> get ( 'controller' ) , $ menuItem -> get ( 'action' ) ) ; if ( $ label ) { $ this -> altLabels [ $ key ] = $ label ; } $ this -> offsetSet ( $ key , $ menuItem ) ; return $ this ; }
docstring: Add a menu item to this list
  
  @param \Gems_Menu_SubMenuItem $menuItem
  @param string $label Optional alternative label
  @return \Gems_Menu_MenuList (continuation pattern)
docstring_tokens: Add a menu item to this list