本文整理汇总了PHP中JModelLegacy::populateState方法的典型用法代码示例。如果您正苦于以下问题:PHP JModelLegacy::populateState方法的具体用法?PHP JModelLegacy::populateState怎么用?PHP JModelLegacy::populateState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModelLegacy
的用法示例。
在下文中一共展示了JModelLegacy::populateState方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: populateState
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
*/
protected function populateState()
{
// Load the parameters - this will only load those from config.xml
$params = JComponentHelper::getParams('com_componentarchitect');
$this->setState('params', $params);
parent::populateState();
}
示例2: populateState
function populateState()
{
parent::populateState();
$this->setState('template.id', JRequest::getInt('id'));
$this->setState('content.id', null);
$this->setState('category.id', null);
}
示例3: populateState
function populateState()
{
parent::populateState();
$this->setState('template.id', JFactory::getApplication()->input->getInt('id'));
$this->setState('content.id', null);
$this->setState('category.id', null);
}
示例4: populateState
/**
* 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()
{
$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', '');
parent::populateState();
}
示例5: populateState
/**
* 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()
{
$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();
}
示例6: populateState
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @since 1.6
*/
protected function populateState()
{
parent::populateState();
$app = JFactory::getApplication("Site");
/** @var $app JApplicationSite */
// Get the pk of the record from the request.
$value = $app->input->getInt("id");
$this->setState($this->getName() . '.project_id', $value);
// Load the parameters.
$value = $app->getParams($this->option);
$this->setState('params', $value);
}
示例7: 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.
$this->setState('message', User::getState('com_installer.message'));
$this->setState('extension_message', User::getState('com_installer.extension_message'));
User::setState('com_installer.message', '');
User::setState('com_installer.extension_message', '');
// Recall the 'Install from Directory' path.
$path = Request::getState($this->_context . '.install_directory', 'install_directory', Config::get('tmp_path'));
$this->setState('install.directory', $path);
parent::populateState();
}
示例8: populateState
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
*/
protected function populateState()
{
$app = JFactory::getApplication('administrator');
$this->setState('message', $app->getUserState('com_demo.message'));
$app->setUserState('com_demo.message', '');
// Recall the 'Import from Directory' path.
$path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path'));
$this->setState('import.directory', $path);
// set uploading values
$this->use_streams = false;
$this->allow_unsafe = false;
$this->safeFileOptions = array();
parent::populateState();
}
示例9: populateState
protected function populateState($ordering = null, $direction = null)
{
parent::populateState('lastname', 'ASC');
}
示例10: 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();
$filters = JRequest::getVar('filters');
if (empty($filters)) {
$data = $app->getUserState($this->_context . '.data');
$filters = $data['filters'];
} else {
$app->setUserState($this->_context . '.data', array('filters' => $filters));
}
$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);
$this->setState('filter.type', isset($filters['type']) ? $filters['type'] : '');
if (!isset($filters['update_site_id'])) {
JRequest::setVar('update_site_id', '1');
}
$this->setState('filter.update_site_id', isset($filters['update_site_id']) ? $filters['update_site_id'] : '1');
$this->setState('filter.folder', isset($filters['folder']) ? $filters['folder'] : '');
$this->setState('filter.search', isset($filters['search']) ? $filters['search'] : '');
parent::populateState('a.name', 'asc');
}