本文整理汇总了PHP中JModelForm::populateState方法的典型用法代码示例。如果您正苦于以下问题:PHP JModelForm::populateState方法的具体用法?PHP JModelForm::populateState怎么用?PHP JModelForm::populateState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModelForm
的用法示例。
在下文中一共展示了JModelForm::populateState方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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()
{
parent::populateState();
$app = JFactory::getApplication();
/** @var $app JApplicationSite */
// Load the parameters.
$value = $app->getParams($this->option);
$this->setState('params', $value);
}
示例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()
{
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() . '.id', $value);
}
示例3: populateState
protected function populateState()
{
$jinput = JFactory::getApplication()->input;
$client = $jinput->get('client', 'site', 'cmd');
$tag = $jinput->get('tag', '', 'cmd');
$id = $jinput->get('id', '0', 'int');
$this->setState('language.client', $client);
$this->setState('language.tag', $tag);
$this->setState('language.id', $id);
parent::populateState();
}
示例4: 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();
/** @var $app JApplicationSite */
// Get the pk of the record from the request.
$value = $app->input->getInt('id');
$this->setState($this->getName() . '.id', $value);
// Load the parameters.
$params = $app->getParams();
$this->setState('params', $params);
}
示例5: populateState
protected function populateState()
{
$app = JFactory::getApplication();
$id = JRequest::getInt($this->pk_name);
$this->setState(strtolower($this->model_key) . '.' . $this->pk_name, $id);
$cmd = JRequest::getCmd('cmd', '');
$this->setState(strtolower($this->model_key) . '.cmd', $cmd);
// Load the parameters.
$params = $app->getParams();
$this->setState('params', $params);
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('item_id', $value);
$value = $app->input->getInt("comment_id");
$this->setState('comment_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()
{
parent::populateState();
$app = JFactory::getApplication();
/** @var $app JApplicationSite */
// Get the pk of the record from the request.
$value = $app->input->getInt("id", 0);
$this->setState($this->getName() . '.id', $value);
// Get category ID
$value = $app->getUserState($this->option . ".items.catid");
$this->setState('category_id', $value);
// Load the parameters.
$value = $app->getParams($this->option);
$this->setState('params', $value);
}