/** * 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) { $app = JFactory::getApplication(); $session = JFactory::getSession(); $acl = RtiprintHelper::getActions(); parent::populateState($ordering, $direction); //Only show the published items if (!$acl->get('core.admin') && !$acl->get('core.edit.state')) { $this->setState('filter.published', 1); } }
/** * 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) { $app = JFactory::getApplication(); $session = JFactory::getSession(); $acl = RtiprintHelper::getActions(); parent::populateState($ordering, $direction); }