Beispiel #1
0
 /**
  * Method to auto-populate the model state.
  * Note. Calling getState in this method will result in recursion.
  *
  * @param   string  $ordering   An optional ordering field.
  * @param   string  $direction  An optional direction (asc|desc).
  *
  * @return  void
  */
 protected function populateState($ordering = null, $direction = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication('administrator');
     // Load the parameters.
     $params = JComponentHelper::getParams('com_fabrik');
     $this->setState('params', $params);
     $published = $app->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
     $this->setState('filter.published', $published);
     $search = $app->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
     $this->setState('filter.search', $search);
     // Load the form state
     $package = $app->getUserStateFromRequest($this->context . '.filter.form', 'filter_form', '');
     $this->setState('filter.form', $package);
     // List state information.
     parent::populateState('name', 'asc');
 }
Beispiel #2
0
 /**
  * Method to auto-populate the model state.
  *
  * Note. Calling getState in this method will result in recursion.
  *
  * @param   string  $ordering   An optional ordering field.
  * @param   string  $direction  An optional direction (asc|desc).
  *
  * @since	1.6
  *
  * @return  null
  */
 protected function populateState($ordering = null, $direction = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication('administrator');
     // Load the parameters.
     $params = JComponentHelper::getParams('com_fabrik');
     $this->setState('params', $params);
     $published = $app->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
     $this->setState('filter.published', $published);
     $search = $app->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
     $this->setState('filter.search', $search);
     // Load the form state
     $form = $app->getUserStateFromRequest($this->context . '.filter.form', 'filter_form', '');
     $this->setState('filter.form', $form);
     // Load the group state
     $group = $app->getUserStateFromRequest($this->context . '.filter.group', 'filter_group', '');
     $this->setState('filter.group', $group);
     // Load the show in list state
     $showinlist = $app->getUserStateFromRequest($this->context . '.filter.showinlist', 'filter_showinlist', '');
     $this->setState('filter.showinlist', $showinlist);
     // Load the plug-in state
     $plugin = $app->getUserStateFromRequest($this->context . '.filter.plugin', 'filter_plugin', '');
     $this->setState('filter.plugin', $plugin);
     // List state information.
     parent::populateState($ordering, $direction);
 }