protected function populateState($ordering = null, $direction = null) { // Load the component parameters. $params = JComponentHelper::getParams($this->option); $this->setState('params', $params); // Load filter search. $value = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $value); // Load filter state. $value = $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_state', '', 'string'); $this->setState('filter.state', $value); // Load filter approved state. $value = $this->getUserStateFromRequest($this->context . '.filter.approved', 'filter_approved', '', 'string'); $this->setState('filter.approved', $value); // Load filter featured state. $value = $this->getUserStateFromRequest($this->context . '.filter.featured', 'filter_featured', '', 'string'); $this->setState('filter.featured', $value); // Load filter category. $value = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id', 0, 'int'); $this->setState('filter.category_id', $value); // Load filter type. $value = $this->getUserStateFromRequest($this->context . '.filter.type_id', 'filter_type_id', 0, 'int'); $this->setState('filter.type_id', $value); // List state information. parent::populateState('a.created', 'asc'); }
protected function populateState($ordering = null, $direction = null) { // Initialise variables. $app = JFactory::getApplication(); $session = JFactory::getSession(); $jinput = new Jinput(); // Adjust the context to support modal layouts. if ($layout = $jinput->get('layout')) { $this->context .= '.' . $layout; } $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $trigger = $this->getUserStateFromRequest($this->context . '.filter.trigger', 'filter_trigger'); $this->setState('filter.trigger', $trigger); $socialtype = $this->getUserStateFromRequest($this->context . '.filter.socialtype', 'filter_socialtype'); $this->setState('filter.socialtype', $socialtype); $socialpost = $this->getUserStateFromRequest($this->context . '.filter.socialpost', 'filter_socialpost'); $this->setState('filter.socialpost', $socialpost); $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); // List state information. parent::populateState('m.id', 'asc'); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @return void * * @since 1.6 */ protected function populateState($ordering = null, $direction = null) { $app = JFactory::getApplication('administrator'); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout', 'default', 'cmd')) { $this->context .= '.' . $layout; } // Load the filter state. $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $active = $this->getUserStateFromRequest($this->context . '.filter.active', 'filter_active'); $this->setState('filter.active', $active); $state = $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_state'); $this->setState('filter.state', $state); $groupId = $this->getUserStateFromRequest($this->context . '.filter.group', 'filter_group_id', null, 'int'); $this->setState('filter.group_id', $groupId); $range = $this->getUserStateFromRequest($this->context . '.filter.range', 'filter_range'); $this->setState('filter.range', $range); $groups = json_decode(base64_decode($app->input->get('groups', '', 'BASE64'))); if (isset($groups)) { JArrayHelper::toInteger($groups); } $this->setState('filter.groups', $groups); $excluded = json_decode(base64_decode($app->input->get('excluded', '', 'BASE64'))); if (isset($excluded)) { JArrayHelper::toInteger($excluded); } $this->setState('filter.excluded', $excluded); // Load the parameters. $params = JComponentHelper::getParams('com_users'); $this->setState('params', $params); // List state information. parent::populateState('a.name', 'asc'); }
/** * Method to build an SQL query to load the list data. * * @return string An SQL query */ protected function populateState($ordering = null, $direction = null) { // Initialise variables. $app = JFactory::getApplication(); $session = JFactory::getSession(); // Adjust the context to support modal layouts. if ($layout = JRequest::getVar('layout')) { $this->context .= '.' . $layout; } $search = $app->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); $this->setState('filter.access', $access); $artist = $app->getUserStateFromRequest($this->context . '.filter.artist', 'filter_artist'); $this->setState('filter.artist', $artist); $album = $app->getUserStateFromRequest($this->context . '.filter.album', 'filter_album', ''); $this->setState('filter.album', $album); $categoryId = $app->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id'); $this->setState('filter.category_id', $categoryId); $userId = $app->getUserStateFromRequest($this->context . '.filter.user_id', 'filter_user_id'); $this->setState('filter.user_id', $userId); $year = $app->getUserStateFromRequest($this->context . '.filter.year', 'filter_year', ''); $this->setState('filter.year', $year); // Load the parameters. $params = $app->getParams(); $this->setState('params', $params); // process show_noauth parameter if (!$params->get('show_noauth', 1)) { $this->setState('filter.access', true); } else { $this->setState('filter.access', false); } // List state information. parent::populateState('a.title', 'asc'); }
/** * 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('administrator'); // Load the filter state. $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $accessId = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', null, 'int'); $this->setState('filter.access', $accessId); $state = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '', 'string'); $this->setState('filter.published', $state); $categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id', null); $this->setState('filter.category_id', $categoryId); $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); // Force a language $forcedLanguage = $app->input->get('forcedLanguage'); if (!empty($forcedLanguage)) { $this->setState('filter.language', $forcedLanguage); $this->setState('filter.forcedLanguage', $forcedLanguage); } $tag = $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', ''); $this->setState('filter.tag', $tag); // Load the parameters. $params = JComponentHelper::getParams('com_newsfeeds'); $this->setState('params', $params); // List state information. parent::populateState('a.name', 'asc'); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. */ protected function populateState($ordering = null, $direction = null) { // Initialise variables. $app = JFactory::getApplication('administrator'); // Load the filter state. $search = $app->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $published = $app->getUserStateFromRequest($this->context . '.filter.state', 'filter_published', '', 'string'); $this->setState('filter.state', $published); //Filtering catid $this->setState('filter.catid', $app->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid', '', 'string')); //Filtering access $this->setState('filter.access', $app->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', '', 'string')); //Filtering language //Language filters for all languages is a * make it empty if (JFactory::getApplication()->input->getVar('filter_language') == '*') { JFactory::getApplication()->input->set('filter_language', ''); } $this->setState('filter.language', $app->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '', 'string')); // Load the parameters. $params = JComponentHelper::getParams('com_db8download'); $this->setState('params', $params); // List state information. parent::populateState('a.name', 'asc'); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @param string An optional ordering field. * @param string An optional direction (asc|desc). * * @return void * @since 1.6 */ protected function populateState($ordering = null, $direction = null) { // Initialise variables. $app = JFactory::getApplication(); $context = $this->context; $extension = $app->getUserStateFromRequest('com_categories.categories.filter.extension', 'extension', 'com_content', 'cmd'); $this->setState('filter.extension', $extension); $parts = explode('.', $extension); // extract the component name $this->setState('filter.component', $parts[0]); // extract the optional section name $this->setState('filter.section', count($parts) > 1 ? $parts[1] : null); $search = $this->getUserStateFromRequest($context . '.search', 'filter_search'); $this->setState('filter.search', $search); $level = $this->getUserStateFromRequest($context . '.filter.level', 'filter_level', 0, 'int'); $this->setState('filter.level', $level); $access = $this->getUserStateFromRequest($context . '.filter.access', 'filter_access', 0, 'int'); $this->setState('filter.access', $access); $published = $this->getUserStateFromRequest($context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); $language = $this->getUserStateFromRequest($context . '.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); // List state information. parent::populateState('a.lft', 'asc'); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @since 1.6 */ protected function populateState($ordering = null, $direction = null) { // Initialise variables. $app = JFactory::getApplication('administrator'); // Load the filter state. $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $accessId = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', null, 'int'); $this->setState('filter.access', $accessId); $state = $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_state', '', 'string'); $this->setState('filter.state', $state); $position = $this->getUserStateFromRequest($this->context . '.filter.position', 'filter_position', '', 'string'); $this->setState('filter.position', $position); $module = $this->getUserStateFromRequest($this->context . '.filter.module', 'filter_module', '', 'string'); $this->setState('filter.module', $module); $clientId = $this->getUserStateFromRequest($this->context . '.filter.client_id', 'filter_client_id', 0, 'int', false); $previousId = $app->getUserState($this->context . '.filter.client_id_previous', null); if ($previousId != $clientId || $previousId === null) { $this->getUserStateFromRequest($this->context . '.filter.client_id_previous', 'filter_client_id_previous', 0, 'int', true); $app->setUserState($this->context . '.filter.client_id_previous', $clientId); } $this->setState('filter.client_id', $clientId); $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); // Load the parameters. $params = JComponentHelper::getParams('com_modules'); $this->setState('params', $params); // List state information. parent::populateState('position', 'asc'); }
protected function populateState($ordering = null, $direction = null) { parent::populateState(); $app = JFactory::getApplication(); $id = JRequest::getVar('id', 0, '', 'int'); $this->setState('airports.id', $id); // Load the filter state. $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $state = $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_search'); $this->setState('filter.state', $state); $level = $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level', 0, 'int'); $this->setState('filter.level', $level); $country_id = $this->getUserStateFromRequest($this->context . '.filter.country_id', 'filter_country_id', 0, 'int'); $this->setState('filter.country_id', $country_id); $app = JFactory::getApplication(); $value = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit')); $limit = $value; $this->setState('list.limit', $limit); $value = $app->getUserStateFromRequest($this->context . '.limitstart', 'limitstart', 0); $limitstart = $limit != 0 ? floor($value / $limit) * $limit : 0; $this->setState('list.start', $limitstart); $value = $app->getUserStateFromRequest($this->context . '.ordercol', 'filter_order', $ordering); $this->setState('list.ordering', $value); $value = $app->getUserStateFromRequest($this->context . '.orderdirn', 'filter_order_Dir', $direction); $this->setState('list.direction', $value); parent::populateState('a.lft', 'asc'); }
/** * 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 = 'a.position', $direction = 'asc') { $app = JFactory::getApplication(); $layout = $app->input->get('layout', '', 'cmd'); // Adjust the context to support modal layouts. if ($layout) { $this->context .= '.' . $layout; } // Load the filter state. $this->setState('filter.search', $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', '', 'string')); $this->setState('filter.position', $this->getUserStateFromRequest($this->context . '.filter.position', 'filter_position', '', 'string')); $this->setState('filter.module', $this->getUserStateFromRequest($this->context . '.filter.module', 'filter_module', '', 'string')); $this->setState('filter.access', $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', '', 'cmd')); // If in modal layout on the frontend, state and language are always forced. if ($app->isSite() && $layout === 'modal') { $this->setState('filter.language', 'current'); $this->setState('filter.state', 1); } else { $this->setState('filter.language', $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '', 'string')); $this->setState('filter.state', $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_state', '', 'string')); } // Special case for the client id. if ($app->isSite() || $layout === 'modal') { $this->setState('client_id', 0); } else { $clientId = (int) $this->getUserStateFromRequest($this->context . '.client_id', 'client_id', 0, 'int'); $clientId = !in_array($clientId, array(0, 1)) ? 0 : $clientId; $this->setState('client_id', $clientId); } // Load the parameters. $params = JComponentHelper::getParams('com_modules'); $this->setState('params', $params); // List state information. parent::populateState($ordering, $direction); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @return void * @since 1.6 */ protected function populateState($ordering = null, $direction = null) { // Initialise variables. $app = JFactory::getApplication('administrator'); // Adjust the context to support modal layouts. if ($layout = JRequest::getVar('layout', 'default')) { $this->context .= '.' . $layout; } // Load the filter state. $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $state = $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_state', ''); if ($state == '') { // XXX Check for sites with lots of users: this may hang this page until timeout if we show all users // XXX so we use a safe filter instead $total_moodle = JoomdleHelperContent::getMoodleUsersNumber($search); $db = $this->getDbo(); if ($search != '') { $searchEscaped = $db->Quote('%' . $db->escape($search, true) . '%', false); } else { $searchEscaped = ""; } $total_joomla = JoomdleHelperContent::getJoomlaUsersNumber($searchEscaped); $max_users = 1000; if ($total_joomla > $max_users || $total_moodle > $max_users) { $state = 'joomla'; } } $this->setState('filter.state', $state); // Load the parameters. $params = JComponentHelper::getParams('com_joomdle'); $this->setState('params', $params); // List state information. parent::populateState('name', 'asc'); }
/** * 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) { $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); // List state information. parent::populateState('table', 'asc'); }
/** * 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) { // Initialise variables. $app = JFactory::getApplication('administrator'); // Set ordering. $orderCol = $app->getUserStateFromRequest($this->context . '.filter_order', 'filter_order'); if (!in_array($orderCol, $this->filter_fields)) { $orderCol = 'a.id'; } $this->setState('list.ordering', $orderCol); // Set ordering direction. $listOrder = $app->getUserStateFromRequest($this->context . 'filter_order_Dir', 'filter_order_Dir'); if (!in_array(strtoupper($listOrder), array('ASC', 'DESC', ''))) { $listOrder = 'ASC'; } // Load the filter state. $published = $app->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '', 'string'); $this->setState('filter.published', $published); // Load the filter search $search = $app->getUserStateFromRequest($this->context . 'filter.search', 'filter_search'); $this->setState('filter.search', $search); // Load the parameters. $params = JComponentHelper::getParams('com_quick2cart'); $this->setState('params', $params); // List state information. parent::populateState('a.id', 'asc'); }
protected function populateState($ordering = null, $direction = null) { $app = JFactory::getApplication('administrator'); $filterSearch = $app->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', ''); $this->setState('filter.search', $filterSearch); parent::populateState('name', 'asc'); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. */ protected function populateState($ordering = null, $direction = null) { // Initialise variables. $app = JFactory::getApplication('administrator'); // Load the filter state. $search = $app->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $published = $app->getUserStateFromRequest($this->context . '.filter.state', 'filter_published', '', 'string'); $this->setState('filter.state', $published); //Filtering alerting $this->setState('filter.alerting', $app->getUserStateFromRequest($this->context . '.filter.alerting', 'filter_alerting', '', 'string')); //Filtering tickerkat $this->setState('filter.tickerkat', $app->getUserStateFromRequest($this->context . '.filter.tickerkat', 'filter_tickerkat', '', 'string')); //Filtering data1 $this->setState('filter.data1', $app->getUserStateFromRequest($this->context . '.filter.data1', 'filter_data1', '', 'string')); //Filtering date1 $this->setState('filter.date1.from', $app->getUserStateFromRequest($this->context . '.filter.date1.from', 'filter_from_date1', '', 'string')); $this->setState('filter.date1.to', $app->getUserStateFromRequest($this->context . '.filter.date1.to', 'filter_to_date1', '', 'string')); //Filtering auswahl_orga $this->setState('filter.auswahl_orga', $app->getUserStateFromRequest($this->context . '.filter.auswahl_orga', 'filter_auswahl_orga', '', 'string')); //Filtering ausruestung $this->setState('filter.ausruestung', $app->getUserStateFromRequest($this->context . '.filter.ausruestung', 'filter_ausruestung', '', 'string')); //Filtering created_by $this->setState('filter.created_by', $app->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '', 'string')); // Load the parameters. $params = JComponentHelper::getParams('com_einsatzkomponente'); $this->setState('params', $params); // List state information. parent::populateState('a.date1', 'desc'); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @return void * @since 1.6 */ protected function populateState($ordering = null, $direction = null) { // Initialise variables. $app = JFactory::getApplication(); $session = JFactory::getSession(); // Adjust the context to support modal layouts. if ($layout = JRequest::getVar('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', 0, 'int'); $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); $categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id'); $this->setState('filter.category_id', $categoryId); $level = $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level', 0, 'int'); $this->setState('filter.level', $level); $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); // List state information. parent::populateState('a.title', 'asc'); }
/** * 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 = 'a.name', $direction = 'asc') { $app = JFactory::getApplication(); $forcedLanguage = $app->input->get('forcedLanguage', '', 'cmd'); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) { $this->context .= '.' . $layout; } // Adjust the context to support forced languages. if ($forcedLanguage) { $this->context .= '.' . $forcedLanguage; } // Load the filter state. $this->setState('filter.search', $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', '', 'string')); $this->setState('filter.published', $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '', 'string')); $this->setState('filter.category_id', $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id', '', 'cmd')); $this->setState('filter.access', $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', '', 'cmd')); $this->setState('filter.language', $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '', 'string')); $this->setState('filter.tag', $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', '', 'string')); $this->setState('filter.level', $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level', null, 'int')); // Load the parameters. $params = JComponentHelper::getParams('com_newsfeeds'); $this->setState('params', $params); // List state information. parent::populateState($ordering, $direction); // Force a language. if (!empty($forcedLanguage)) { $this->setState('filter.language', $forcedLanguage); } }
/** * 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 = 'a.lft', $direction = 'asc') { $app = JFactory::getApplication(); $forcedLanguage = $app->input->get('forcedLanguage', '', 'cmd'); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) { $this->context .= '.' . $layout; } // Adjust the context to support forced languages. if ($forcedLanguage) { $this->context .= '.' . $forcedLanguage; } $extension = $app->getUserStateFromRequest($this->context . '.filter.extension', 'extension', 'com_content', 'cmd'); $this->setState('filter.extension', $extension); $parts = explode('.', $extension); // Extract the component name $this->setState('filter.component', $parts[0]); // Extract the optional section name $this->setState('filter.section', count($parts) > 1 ? $parts[1] : null); $this->setState('filter.search', $this->getUserStateFromRequest($this->context . '.search', 'filter_search', '', 'string')); $this->setState('filter.published', $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '', 'string')); $this->setState('filter.access', $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', '', 'cmd')); $this->setState('filter.language', $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '', 'string')); $this->setState('filter.tag', $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', '', 'string')); $this->setState('filter.level', $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level', '', 'string')); // List state information. parent::populateState($ordering, $direction); // Force a language. if (!empty($forcedLanguage)) { $this->setState('filter.language', $forcedLanguage); } }
protected function populateState() { // Initialise variables. $app = JFactory::getApplication('administrator'); // Load the filter state. $search = $app->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); /* $accessId = $app->getUserStateFromRequest($this->context.'.filter.access', 'filter_access', null, 'int'); $this->setState('filter.access', $accessId); $state = $app->getUserStateFromRequest($this->context.'.filter.state', 'filter_published', '', 'string'); $this->setState('filter.state', $state); */ $categoryId = $app->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id', null); $this->setState('filter.category_id', $categoryId); /* $language = $app->getUserStateFromRequest($this->context.'.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); */ // Load the parameters. $params = JComponentHelper::getParams('com_phocagallery'); $this->setState('params', $params); // List state information. parent::populateState('uc.username', 'asc'); }
protected function populateState($ordering = null, $direction = null) { $app = JFactory::getApplication(); $this->setState($this->context . '.filter.search', $app->getUserStateFromRequest($this->context . '.fields.search', 'filter_search')); $this->setState($this->context . '.filter.filter_state', $app->getUserStateFromRequest($this->context . '.fields.filter_state', 'filter_state')); parent::populateState('ordering', 'ASC'); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @since 1.6 */ protected function populateState($ordering = null, $direction = null) { // List state information. parent::populateState('a.record_date', 'asc'); $app = JFactory::getApplication(); /** @var $app JApplicationSite * */ // Load the component parameters. $params = $app->getParams($this->option); $this->setState('params', $params); // Get category id $value = $app->getUserStateFromRequest($this->context . ".catid", "id", 0, "int"); $this->setState('filter.category_id', $value); // Get status id $value = $app->input->getInt("filter_status"); $this->setState('filter.status_id', $value); // Ordering $order = $params->get("items_ordering", 0); $orderDir = $params->get("items_ordering_direction", "ASC"); $this->prepareOrderingState($order, $orderDir); // Pagination $value = $params->get("items_display_results_number", 0); if (!$value) { $value = $app->input->getInt('limit', $app->get('list_limit', 0)); } $this->setState('list.limit', $value); $value = $app->input->getInt('limitstart', 0); $this->setState('list.start', $value); }
/** * 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.0.0 */ protected function populateState($ordering = null, $direction = null) { $app = JFactory::getApplication(); $context = $this->context; $extension = 'com_digicom'; $this->setState('filter.extension', $extension); $parts = explode('.', $extension); // Extract the component name $this->setState('filter.component', $parts[0]); // Extract the optional section name $this->setState('filter.section', count($parts) > 1 ? $parts[1] : null); $search = $this->getUserStateFromRequest($context . '.search', 'filter_search'); $this->setState('filter.search', $search); $level = $this->getUserStateFromRequest($context . '.filter.level', 'filter_level'); $this->setState('filter.level', $level); $access = $this->getUserStateFromRequest($context . '.filter.access', 'filter_access'); $this->setState('filter.access', $access); $published = $this->getUserStateFromRequest($context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); $language = $this->getUserStateFromRequest($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('a.lft', 'asc'); // Force a language $forcedLanguage = $app->input->get('forcedLanguage'); if (!empty($forcedLanguage)) { $this->setState('filter.language', $forcedLanguage); $this->setState('filter.forcedLanguage', $forcedLanguage); } }
/** * Method to auto-populate the model state. * * @param string $ordering * @param string $direction * * @return void * @since 1.6 */ protected function populateState($ordering = null, $direction = null) { $this->context = 'com_kunena.admin.attachments'; $app = JFactory::getApplication(); // Adjust the context to support modal layouts. $layout = $app->input->get('layout'); if ($layout) { $this->context .= '.' . $layout; } $filter_active = ''; // List state information $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', '', 'string'); $this->setState('filter.search', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.title', 'filter_title', '', 'string'); $this->setState('filter.title', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type', '', 'string'); $this->setState('filter.type', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.size', 'filter_size', '', 'string'); $this->setState('filter.size', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.dims', 'filter_dims', '', 'string'); $this->setState('filter.dims', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.username', 'filter_username', '', 'string'); $this->setState('filter.username', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.post', 'filter_post', '', 'string'); $this->setState('filter.post', $value); $this->setState('filter.active', !empty($filter_active)); // List state information. parent::populateState('filename', 'asc'); }
/** * Method to auto-populate the model state. */ protected function populateState($ordering = null, $direction = null) { $this->context = 'com_kunena.admin.users'; $app = JFactory::getApplication(); // Adjust the context to support modal layouts. $layout = $app->input->get('layout'); if ($layout) { $this->context .= '.' . $layout; } $filter_active = ''; $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', '', 'string'); $this->setState('filter.search', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.username', 'filter_username', '', 'string'); $this->setState('filter.username', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.email', 'filter_email', '', 'string'); $this->setState('filter.email', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.signature', 'filter_signature', '', 'string'); $this->setState('filter.signature', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.block', 'filter_block', '', 'string'); $this->setState('filter.block', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.banned', 'filter_banned', '', 'string'); $this->setState('filter.banned', $value); $filter_active .= $value = $this->getUserStateFromRequest($this->context . '.filter.moderator', 'filter_moderator', '', 'string'); $this->setState('filter.moderator', $value); $this->setState('filter.active', !empty($filter_active)); // List state information. parent::populateState('username', 'asc'); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @return void * @since 1.6 */ protected function populateState($ordering = null, $direction = null) { $app = JFactory::getApplication('administrator'); $search = $this->getUserStateFromRequest($this->context . '.search', 'filter_search'); $this->setState('filter.search', $search); $published = $this->getUserStateFromRequest($this->context . '.published', 'filter_published', ''); $this->setState('filter.published', $published); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); $this->setState('filter.access', $access); $parentId = $this->getUserStateFromRequest($this->context . '.filter.parent_id', 'filter_parent_id', 0, 'int'); $this->setState('filter.parent_id', $parentId); $level = $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level', 0, 'int'); $this->setState('filter.level', $level); $menuType = $app->input->getString('menutype', null); if ($menuType) { if ($menuType != $app->getUserState($this->context . '.filter.menutype')) { $app->setUserState($this->context . '.filter.menutype', $menuType); $app->input->set('limitstart', 0); } } else { $menuType = $app->getUserState($this->context . '.filter.menutype'); if (!$menuType) { $menuType = $this->getDefaultMenuType(); } } $this->setState('filter.menutype', $menuType); $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); // Component parameters. $params = JComponentHelper::getParams('com_menus'); $this->setState('params', $params); // List state information. parent::populateState('a.lft', 'asc'); }
protected function populateState($ordering = null, $direction = null) { parent::populateState(); $app = JFactory::getApplication(); $id = JRequest::getVar('id', 0, '', 'int'); $this->setState('szavazasoklist.id', $id); }
protected function populateState($ordering = NULL, $direction = NULL) { // Initialise variables. $app = JFactory::getApplication('administrator'); // Load the filter state. $search = $app->getUserStateFromRequest($this->context.'.filter.search', 'filter_search'); $this->setState('filter.search', $search); /* $accessId = $app->getUserStateFromRequest($this->context.'.filter.access', 'filter_access', null, 'int'); $this->setState('filter.access', $accessId); $state = $app->getUserStateFromRequest($this->context.'.filter.state', 'filter_published', '', 'string'); $this->setState('filter.state', $state); */ $id = JRequest::getVar( 'id', '', '', 'int'); if ((int)$id > 0) { $this->setState('filter.filestat_id', $id); } else { //$fileStatId = $app->getUserStateFromRequest($this->context.'.filter.filestat_id', 'filter_filestat_id', $id); $this->setState('filter.filestat_id', 0); } /* $language = $app->getUserStateFromRequest($this->context.'.filter.language', 'filter_language', ''); $this->setState('filter.language', $language);*/ // Load the parameters. $params = JComponentHelper::getParams('com_phocadownload'); $this->setState('params', $params); // List state information. parent::populateState('username', 'asc'); }
/** * 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', 0, 'int'); $this->setState('filter.access', $access); $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); $categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id'); $this->setState('filter.category_id', $categoryId); $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); // Force a language. $forcedLanguage = $app->input->get('forcedLanguage'); if (!empty($forcedLanguage)) { $this->setState('filter.language', $forcedLanguage); $this->setState('filter.forcedLanguage', $forcedLanguage); } $tag = $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', ''); $this->setState('filter.tag', $tag); // List state information. parent::populateState('a.name', 'asc'); }
/** * Method to auto-populate the model state. * * @return void */ 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; } $system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name'); $this->setState('filter.system_name', $system_name); $name_code = $this->getUserStateFromRequest($this->context . '.filter.name_code', 'filter_name_code'); $this->setState('filter.name_code', $name_code); $component_version = $this->getUserStateFromRequest($this->context . '.filter.component_version', 'filter_component_version'); $this->setState('filter.component_version', $component_version); $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); $this->setState('filter.short_description', $short_description); $companyname = $this->getUserStateFromRequest($this->context . '.filter.companyname', 'filter_companyname'); $this->setState('filter.companyname', $companyname); $author = $this->getUserStateFromRequest($this->context . '.filter.author', 'filter_author'); $this->setState('filter.author', $author); $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); $this->setState('filter.sorting', $sorting); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); $this->setState('filter.access', $access); $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); $this->setState('filter.created_by', $created_by); $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); $this->setState('filter.created', $created); // List state information. parent::populateState($ordering, $direction); }
protected function populateState($ordering = null, $direction = null) { // Initialise variables. $app = JFactory::getApplication(); $session = JFactory::getSession(); $jinput = new Jinput(); // Adjust the context to support modal layouts. if ($layout = $jinput->get('layout')) { $this->context .= '.' . $layout; } $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published'); $this->setState('filter.published', $published); $fieldtype = $this->getUserStateFromRequest($this->context . '.filter.fieldtype', 'filter_fieldtype', ''); $this->setState('filter.fieldtype', $fieldtype); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); $this->setState('filter.access', $access); $level = $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level', 0, 'int'); $this->setState('filter.level', $level); $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); // List state information. parent::populateState('u.ordering', 'asc'); }