administrator/components/com_categories/models/category.php
protected function populateState()
	{
		$app = JFactory::getApplication('administrator');

		$parentId = $app->input->getInt('parent_id');
		$this->setState('category.parent_id', $parentId);

		// Load the User state.
		$pk = $app->input->getInt('id');
		$this->setState($this->getName() . '.id', $pk);

		$extension = $app->input->get('extension', 'com_content');
		$this->setState('category.extension', $extension);
		$parts = explode('.', $extension);

		// Extract the component name
		$this->setState('category.component', $parts[0]);

		// Extract the optional section name
		$this->setState('category.section', (count($parts) > 1) ? $parts[1] : null);

		// Load the parameters.
		$params = JComponentHelper::getParams('com_categories');
		$this->setState('params', $params);
	}
protected function populateState()
	{
		$app = JFactory::getApplication('administrator');

		$parentId = $app->input->getInt('parent_id');
		$this->setState('category.parent_id', $parentId);

		// Load the User state.
		$pk = $app->input->getInt('id');
		$this->setState($this->getName() . '.id', $pk);

		$extension = $app->input->get('extension', 'com_content');
		$this->setState('category.extension', $extension);
		$parts = explode('.', $extension);

		// Extract the component name
		$this->setState('category.component', $parts[0]);

		// Extract the optional section name
		$this->setState('category.section', (count($parts) > 1) ? $parts[1] : null);

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

Note. Calling getState in this method will result in recursion.

@return  void

@since   1.6
Auto - populate the model state .