本文整理汇总了PHP中JModelAdmin::populateState方法的典型用法代码示例。如果您正苦于以下问题:PHP JModelAdmin::populateState方法的具体用法?PHP JModelAdmin::populateState怎么用?PHP JModelAdmin::populateState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModelAdmin
的用法示例。
在下文中一共展示了JModelAdmin::populateState方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: populateState
protected function populateState()
{
parent::populateState();
$this->setState('template.id', JRequest::getInt('id'));
$this->setState('content.id', null);
$this->setState('category.id', null);
}
示例2: populateState
/**
* Stock method to auto-populate the model state.
*
* @return void
*
* @since 2.0.0
*/
protected function populateState()
{
parent::populateState();
// Get the plugin from the request.
$plugin = JFactory::getApplication()->input->get('plugin');
$this->setState($this->getName() . '.plugin', $plugin);
}
示例3: populateState
protected function populateState()
{
$addon_id = JFactory::getApplication()->input->getInt('addon_id');
$this->setState($this->getName() . '.addon_id', $addon_id);
// List state information.
parent::populateState();
}
示例4: populateState
protected function populateState()
{
$table = $this->getTable();
$key = $table->getKeyName();
$pk = JRequest::getInt($key);
//dmp($_REQUEST);exit();
return parent::populateState();
}
示例5: populateState
/**
* Stock method to auto-populate the model state.
* @return void
* @since 12.2
*/
protected function populateState()
{
parent::populateState();
$app = JFactory::getApplication();
/** @var $app JApplicationAdministrator * */
$value = $app->getUserStateFromRequest("url.id", "url_id");
$this->setState($this->getName() . '.url_id', $value);
}
示例6: populateState
public function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication('administrator');
$state = $app->getUserStateFromRequest($this->context . '.filter.interpreter_id', 'filter_interpreter_id', '', 'string');
$this->setState('filter.interpreter_id', $state);
// List state information.
parent::populateState();
}
示例7: populateState
protected function populateState()
{
parent::populateState();
$this->setState('template.id', JFactory::getApplication()->input->getInt('id'));
$this->setState('content.id', null);
$this->setState('category.id', null);
$this->setState('template.template', null);
}
示例8: 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();
$this->setState('user.id', \User::get('id'));
$messageId = (int) \Request::getInt('message_id');
$this->setState('message.id', $messageId);
$replyId = (int) \Request::getInt('reply_id');
$this->setState('reply.id', $replyId);
}
示例9: 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();
$user = JFactory::getUser();
$this->setState('user.id', $user->get('id'));
$messageId = (int) JRequest::getInt('message_id');
$this->setState('message.id', $messageId);
$replyId = (int) JRequest::getInt('reply_id');
$this->setState('reply.id', $replyId);
}
示例10: populateState
/**
* Method to auto-populate the model state.
*
* This method should only be called once per instantiation and is designed
* to be called on the first call to the getState() method unless the model
* configuration flag to ignore the request is set.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 1.6
*/
protected function populateState()
{
parent::populateState();
$input = JFactory::getApplication()->input;
$user = JFactory::getUser();
$this->setState('user.id', $user->get('id'));
$messageId = (int) $input->getInt('message_id');
$this->setState('message.id', $messageId);
$replyId = (int) $input->getInt('reply_id');
$this->setState('reply.id', $replyId);
}
示例11: populateState
protected function populateState()
{
parent::populateState();
$params = JComponentHelper::getParams('com_tz_portfolio');
$this->setState('params', $params);
if ($params->get('tz_image_xsmall', 100)) {
$sizeImage['XS'] = (int) $params->get('tz_image_xsmall', 100);
}
if ($params->get('tz_image_small', 200)) {
$sizeImage['S'] = (int) $params->get('tz_image_small', 200);
}
if ($params->get('tz_image_medium', 400)) {
$sizeImage['M'] = (int) $params->get('tz_image_medium', 400);
}
if ($params->get('tz_image_large', 600)) {
$sizeImage['L'] = (int) $params->get('tz_image_large', 600);
}
if ($params->get('tz_image_xsmall', 900)) {
$sizeImage['XL'] = (int) $params->get('tz_image_xlarge', 900);
}
if ($params->get('tz_image_gallery_xsmall')) {
$size['XS'] = (int) $params->get('tz_image_gallery_xsmall');
}
if ($params->get('tz_image_gallery_small')) {
$size['S'] = (int) $params->get('tz_image_gallery_small');
}
if ($params->get('tz_image_gallery_medium')) {
$size['M'] = (int) $params->get('tz_image_gallery_medium');
}
if ($params->get('tz_image_gallery_large')) {
$size['L'] = (int) $params->get('tz_image_gallery_large');
}
if ($params->get('tz_image_gallery_xsmall')) {
$size['XL'] = (int) $params->get('tz_image_gallery_xlarge');
}
$this->setState('sizeImage', $sizeImage);
$this->setState('size', $size);
$this->setState('article.id', JRequest::getInt('id'));
}
示例12: populateState
function populateState()
{
parent::populateState();
$this->setState('com_tz_portfolio.plugin.articleId', null);
$this->setState('com_tz_portfolio.plugin.pluginid', null);
}
示例13: 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($ordering = null, $direction = null)
{
$app = JFactory::getApplication('administrator');
$id = $app->input->getInt('id', 0);
if (!empty($id)) {
$app->setUserState('com_englishconcept.edit.grammarexercise.id', $id);
}
// List state information.
parent::populateState($ordering, $direction);
}
示例14: populateState
/**
* Auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
* @since 1.6
*/
protected function populateState()
{
// Execute the parent method.
parent::populateState();
$app = JFactory::getApplication('administrator');
// Load the User state.
$pk = (int) JRequest::getInt('extension_id');
$this->setState('plugin.id', $pk);
}
示例15: populateState
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*/
protected function populateState()
{
parent::populateState();
// Set Nested Item
$table = $this->getTable();
if ($table instanceof JTableNested) {
$nested = true;
} else {
$nested = false;
}
$this->setState('item.nested', $nested);
}