english/components/com_contact/models/contact.php
/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @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()
	{
		$app = JFactory::getApplication('site');
		$pk = JRequest::getInt('id');
		$this->setState('contact.id', $pk);
		$params = $app->getParams();
		$this->setState('params', $params);
		$user = JFactory::getUser();
		if ((!$user->authorise('core.edit.state', 'com_contact')) &&  (!$user->authorise('core.edit', 'com_contact'))){
			$this->setState('filter.published', 1);
			$this->setState('filter.archived', 2);
		}
	}
protected function populateState ( ) { $ app = JFactory :: getApplication ( 'site' ) ; $ pk = JRequest :: getInt ( 'id' ) ; $ this -> setState ( 'contact.id' , $ pk ) ; $ params = $ app -> getParams ( ) ; $ this -> setState ( 'params' , $ params ) ; $ user = JFactory :: getUser ( ) ; if ( ( ! $ user -> authorise ( 'core.edit.state' , 'com_contact' ) ) && ( ! $ user -> authorise ( 'core.edit' , 'com_contact' ) ) ) { $ this -> setState ( 'filter.published' , 1 ) ; $ this -> setState ( 'filter.archived' , 2 ) ; } }
Method to auto-populate the model state.
Method to auto - populate the model state .
// Load state from the request. // Load the parameters.