english/administrator/components/com_menus/controllers/item.php
/**
	 * Method to add a new menu item.
	 *
	 * @return	void
	 * @since	1.6
	 */
Method to add a new menu item.
Method to add a new menu item .
public function add()
	{
		$app		= JFactory::getApplication();
		$context	= 'com_menus.edit.item';
		$result = parent::add();
		if ($result) {
			$app->setUserState($context.'.type',	null);
			$app->setUserState($context.'.link',	null);
			$menuType = $app->getUserStateFromRequest($this->context.'.filter.menutype', 'menutype', 'mainmenu', 'cmd');
			$this->setRedirect(JRoute::_('index.php?option=com_menus&view=item&menutype='.$menuType.$this->getRedirectToItemAppend(), false));
		}
		return $result;
	}
public function add ( ) { $ app = JFactory :: getApplication ( ) ; $ context = 'com_menus.edit.item' ; $ result = parent :: add ( ) ; if ( $ result ) { $ app -> setUserState ( $ context . '.type' , null ) ; $ app -> setUserState ( $ context . '.link' , null ) ; $ menuType = $ app -> getUserStateFromRequest ( $ this -> context . '.filter.menutype' , 'menutype' , 'mainmenu' , 'cmd' ) ; $ this -> setRedirect ( JRoute :: _ ( 'index.php?option=com_menus&view=item&menutype=' . $ menuType . $ this -> getRedirectToItemAppend ( ) , false ) ) ; } return $ result ; }
Method to add a new menu item.
Method to add a new menu item .
// Initialise variables.