本文整理汇总了PHP中tmsModel::populateState方法的典型用法代码示例。如果您正苦于以下问题:PHP tmsModel::populateState方法的具体用法?PHP tmsModel::populateState怎么用?PHP tmsModel::populateState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tmsModel
的用法示例。
在下文中一共展示了tmsModel::populateState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: populateState
/**
* 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);
}
}
示例2: populateState
/**
* 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
}