english/administrator/components/com_categories/models/category.php
/**
	 * Auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @since	1.6
	 */
Auto-populate the model state.
Note. Calling getState in this method will result in recursion.


Auto - populate the model state . Note . Calling getState in this method will result in recursion .
protected function populateState()
	{
		$app = JFactory::getApplication('administrator');
		$parentId = JRequest::getInt('parent_id');
		$this->setState('category.parent_id', $parentId);
		$pk = (int) JRequest::getInt('id');
		$this->setState($this->getName().'.id', $pk);
		$extension = JRequest::getCmd('extension', 'com_content');
		$this->setState('category.extension', $extension);
		$parts = explode('.',$extension);
		$this->setState('category.component', $parts[0]);
		$this->setState('category.section', (count($parts)>1)?$parts[1]:null);
		$params	= JComponentHelper::getParams('com_categories');
		$this->setState('params', $params);
	}
protected function populateState ( ) { $ app = JFactory :: getApplication ( 'administrator' ) ; $ parentId = JRequest :: getInt ( 'parent_id' ) ; $ this -> setState ( 'category.parent_id' , $ parentId ) ; $ pk = ( int ) JRequest :: getInt ( 'id' ) ; $ this -> setState ( $ this -> getName ( ) . '.id' , $ pk ) ; $ extension = JRequest :: getCmd ( 'extension' , 'com_content' ) ; $ this -> setState ( 'category.extension' , $ extension ) ; $ parts = explode ( '.' , $ extension ) ; $ this -> setState ( 'category.component' , $ parts [ 0 ] ) ; $ this -> setState ( 'category.section' , ( count ( $ parts ) > 1 ) ? $ parts [ 1 ] : null ) ; $ params = JComponentHelper :: getParams ( 'com_categories' ) ; $ this -> setState ( 'params' , $ params ) ; }
Auto-populate the model state.
Auto - populate the model state .
// Load the User state. // Extract the component name // Extract the optional section name // Load the parameters.