Example #1
0
 /**
  * Method to auto-populate the model state.
  * 
  * This method should only be called once per instantiation and is designed to
  * be called on the first call to the getState() method unless the model
  * configuration flag to ignore the request is set.
  * 
  * Note. Calling getState in this method will result in recursion.
  *
  * @access	public
  * @param	string	$ordering	
  * @param	string	$direction	
  * @return	void
  *
  * @since	11.1
  */
 public function populateState($ordering = null, $direction = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     $session = JFactory::getSession();
     $acl = RtiprintHelper::getActions();
     parent::populateState('a.ordering', 'asc');
     //Only show the published items
     if (!$acl->get('core.admin') && !$acl->get('core.edit.state')) {
         $this->setState('filter.published', 1);
     }
 }
Example #2
0
 /**
  * Method to auto-populate the model state.
  * 
  * This method should only be called once per instantiation and is designed to
  * be called on the first call to the getState() method unless the model
  * configuration flag to ignore the request is set.
  * 
  * Note. Calling getState in this method will result in recursion.
  *
  * @access	public
  * @param	string	$ordering	
  * @param	string	$direction	
  * @return	void
  *
  * @since	11.1
  */
 public function populateState($ordering = null, $direction = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     $session = JFactory::getSession();
     $acl = RtiprintHelper::getActions();
     parent::populateState('', 'asc');
 }