当前位置: 首页>>代码示例>>PHP>>正文


PHP tmsModel::populateState方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:42,代码来源:supplier.php

示例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
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:11,代码来源:departure.php


注:本文中的tmsModel::populateState方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。