/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @since 1.1.0 */ protected function populateState($ordering = null, $direction = null) { if (FieldsandfiltersHelper::setUserStateFieldID($this->context . '.filter')) { $this->setState('list.start', 0); } // If the context is set, assume that stateful lists are used. // @deprecated v.1.2 && J3.x if (!FieldsandfiltersFactory::isVersion() && $this->context) { // Receive & set filters if ($filters = JFactory::getApplication()->getUserStateFromRequest($this->context . '.filter', 'filter', array(), 'array')) { foreach ($filters as $name => $value) { $this->setState('filter.' . $name, $value); } } } // Load the parameters. $params = JComponentHelper::getParams('com_fieldsandfilters'); $this->setState('params', $params); // List state information. parent::populateState('fv.value', 'asc'); }
/** * Stock method to auto-populate the model state. * * @return void * * @since 12.2 */ protected function populateState() { FieldsandfiltersHelper::setUserStateFieldID(sprintf('%s.%ss.filter', $this->option, $this->name)); parent::populateState(); }