當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JModel::populateState方法代碼示例

本文整理匯總了PHP中JModel::populateState方法的典型用法代碼示例。如果您正苦於以下問題:PHP JModel::populateState方法的具體用法?PHP JModel::populateState怎麽用?PHP JModel::populateState使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JModel的用法示例。


在下文中一共展示了JModel::populateState方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: populateState

 /**
  * Method to auto-populate the model state.
  *
  * Note. Calling getState in this method will result in recursion.
  *
  * @since       1.6
  */
 protected function populateState()
 {
     // Load the parameters.
     $params = JComponentHelper::getParams('com_patchtester');
     $this->setState('params', $params);
     $this->setState('github_user', $params->get('org', 'joomla'));
     $this->setState('github_repo', $params->get('repo', 'joomla-cms'));
     parent::populateState();
 }
開發者ID:Gerlof,項目名稱:patchtester,代碼行數:16,代碼來源:pull.php

示例2: populateState

 /**
  * Method to auto-populate the model state.
  *
  * Note. Calling getState in this method will result in recursion.
  *
  * @since	1.6
  */
 protected function populateState()
 {
     // Initialise variables.
     $app = JFactory::getApplication('administrator');
     $this->setState('message', $app->getUserState('com_installer.message'));
     $this->setState('extension_message', $app->getUserState('com_installer.extension_message'));
     $app->setUserState('com_installer.message', '');
     $app->setUserState('com_installer.extension_message', '');
     // Recall the 'Install from Directory' path.
     $path = $app->getUserStateFromRequest($this->_context . '.install_directory', 'install_directory', $app->getCfg('tmp_path'));
     $this->setState('install.directory', $path);
     parent::populateState();
 }
開發者ID:laiello,項目名稱:senluonirvana,代碼行數:20,代碼來源:install.php

示例3: populateState

 /**
  * populateState
  *
  * Method to auto-populate the model state.
  *
  * Note. Calling getState in this method will result in recursion.
  *
  * @since	1.6
  */
 protected function populateState()
 {
     /** messages **/
     $this->setState('message', JFactory::getApplication()->getUserState('com_jfoobar.message'));
     $this->setState('extension_message', JFactory::getApplication()->getUserState('com_jfoobar.extension_message'));
     JFactory::getApplication()->setUserState('com_jfoobar.message', '');
     JFactory::getApplication()->setUserState('com_jfoobar.extension_message', '');
     /** extension type **/
     $this->setState('create.createtype', JRequest::getCmd('createtype', 'component'));
     /** module **/
     $this->setState('create.module_name', JRequest::getCmd('module_name', ''));
     /** plugin **/
     $this->setState('create.plugin_name', JRequest::getCmd('plugin_name', ''));
     $this->setState('create.plugin_type', JRequest::getCmd('plugin_type', 'content'));
     parent::populateState();
 }
開發者ID:naka211,項目名稱:jydsk,代碼行數:25,代碼來源:create.php

示例4: populateState

 /**
  * @param null $ordering
  * @param null $direction
  */
 protected function populateState($ordering = null, $direction = null)
 {
     // Adjust the context to support modal layouts.
     if ($layout = JRequest::getVar('layout')) {
         $this->context .= '.' . $layout;
     }
     //$search = $this->getUserStateFromRequest($this->context . 'filter.published', 'filter_published');
     //        /$this->setState('tag.filter.search', $search);
     // List state information.
     parent::populateState('a.title', 'asc');
 }
開發者ID:lautarodragan,項目名稱:ideary,代碼行數:15,代碼來源:term.php


注:本文中的JModel::populateState方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。