english/administrator/components/com_menus/models/items.php
/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @return	void
	 * @since	1.6
	 */
Method to auto-populate the model state.
Note. Calling getState in this method will result in recursion.


Method to auto - populate the model state . Note . Calling getState in this method will result in recursion .
protected function populateState($ordering = null, $direction = null)
	{
		$app = JFactory::getApplication('administrator');
		$search = $this->getUserStateFromRequest($this->context.'.search', 'filter_search');
		$this->setState('filter.search', $search);
		$published = $this->getUserStateFromRequest($this->context.'.published', 'filter_published', '');
		$this->setState('filter.published', $published);
		$access = $this->getUserStateFromRequest($this->context.'.filter.access', 'filter_access', 0, 'int');
		$this->setState('filter.access', $access);
		$parentId = $this->getUserStateFromRequest($this->context.'.filter.parent_id', 'filter_parent_id', 0, 'int');
		$this->setState('filter.parent_id',	$parentId);
		$level = $this->getUserStateFromRequest($this->context.'.filter.level', 'filter_level', 0, 'int');
		$this->setState('filter.level', $level);
		$menuType = JRequest::getVar('menutype',null);
		if ($menuType) {
			if ($menuType != $app->getUserState($this->context.'.filter.menutype')) {
				$app->setUserState($this->context.'.filter.menutype', $menuType);
				JRequest::setVar('limitstart', 0);
			}
		}
		else {
			$menuType = $app->getUserState($this->context.'.filter.menutype');
			if (!$menuType) {
				$menuType = $this->getDefaultMenuType();
			}
		}
		$this->setState('filter.menutype', $menuType);
		$language = $this->getUserStateFromRequest($this->context.'.filter.language', 'filter_language', '');
		$this->setState('filter.language', $language);
		$params	= JComponentHelper::getParams('com_menus');
		$this->setState('params', $params);
		parent::populateState('a.lft', 'asc');
	}
protected function populateState ( $ ordering = null , $ direction = null ) { $ app = JFactory :: getApplication ( 'administrator' ) ; $ search = $ this -> getUserStateFromRequest ( $ this -> context . '.search' , 'filter_search' ) ; $ this -> setState ( 'filter.search' , $ search ) ; $ published = $ this -> getUserStateFromRequest ( $ this -> context . '.published' , 'filter_published' , '' ) ; $ this -> setState ( 'filter.published' , $ published ) ; $ access = $ this -> getUserStateFromRequest ( $ this -> context . '.filter.access' , 'filter_access' , 0 , 'int' ) ; $ this -> setState ( 'filter.access' , $ access ) ; $ parentId = $ this -> getUserStateFromRequest ( $ this -> context . '.filter.parent_id' , 'filter_parent_id' , 0 , 'int' ) ; $ this -> setState ( 'filter.parent_id' , $ parentId ) ; $ level = $ this -> getUserStateFromRequest ( $ this -> context . '.filter.level' , 'filter_level' , 0 , 'int' ) ; $ this -> setState ( 'filter.level' , $ level ) ; $ menuType = JRequest :: getVar ( 'menutype' , null ) ; if ( $ menuType ) { if ( $ menuType != $ app -> getUserState ( $ this -> context . '.filter.menutype' ) ) { $ app -> setUserState ( $ this -> context . '.filter.menutype' , $ menuType ) ; JRequest :: setVar ( 'limitstart' , 0 ) ; } } else { $ menuType = $ app -> getUserState ( $ this -> context . '.filter.menutype' ) ; if ( ! $ menuType ) { $ menuType = $ this -> getDefaultMenuType ( ) ; } } $ this -> setState ( 'filter.menutype' , $ menuType ) ; $ language = $ this -> getUserStateFromRequest ( $ this -> context . '.filter.language' , 'filter_language' , '' ) ; $ this -> setState ( 'filter.language' , $ language ) ; $ params = JComponentHelper :: getParams ( 'com_menus' ) ; $ this -> setState ( 'params' , $ params ) ; parent :: populateState ( 'a.lft' , 'asc' ) ; }
Method to auto-populate the model state.
Method to auto - populate the model state .
// Component parameters. // List state information.