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
  *
  * @since   1.6
  */
 protected function populateState($ordering = null, $direction = null)
 {
     $app = JFactory::getApplication();
     // Adjust the context to support modal layouts.
     if ($layout = $app->input->get('layout')) {
         $this->_context .= '.' . $layout;
     }
     $search = $this->getUserStateFromRequest($this->_context . '.filter.search', 'filter_search');
     $this->setState('filter.search', $search);
     $access = $this->getUserStateFromRequest($this->_context . '.filter.access', 'filter_access');
     $this->setState('filter.access', $access);
     $authorId = $app->getUserStateFromRequest($this->_context . '.filter.author_id', 'filter_author_id');
     $this->setState('filter.author_id', $authorId);
     $published = $this->getUserStateFromRequest($this->_context . '.filter.published', 'filter_published', '');
     $this->setState('filter.published', $published);
     $level = $this->getUserStateFromRequest($this->_context . '.filter.level', 'filter_level');
     $this->setState('filter.level', $level);
     $language = $this->getUserStateFromRequest($this->_context . '.filter.language', 'filter_language', '');
     $this->setState('filter.language', $language);
     $tag = $this->getUserStateFromRequest($this->_context . '.filter.tag', 'filter_tag', '');
     $this->setState('filter.tag', $tag);
     // List state information.
     parent::populateState('supplier.id', 'desc');
     // Force a language
     $forcedLanguage = $app->input->get('forcedLanguage');
     if (!empty($forcedLanguage)) {
         $this->setState('filter.language', $forcedLanguage);
         $this->setState('filter.forcedLanguage', $forcedLanguage);
     }
 }
Beispiel #2
0
 /**
  * Retireve a list of currencies from the database.
  * This function is used in the backend for the currency listing, therefore no asking if enabled or not
  * @author Max Milbers
  * @return object List of currency objects
  */
 public function populateState($ordering = null, $direction = null)
 {
     parent::populateState($ordering, $direction);
     // TODO: Change the autogenerated stub
 }