本文整理汇总了PHP中Nette\Application\UI\Control::saveState方法的典型用法代码示例。如果您正苦于以下问题:PHP Control::saveState方法的具体用法?PHP Control::saveState怎么用?PHP Control::saveState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nette\Application\UI\Control
的用法示例。
在下文中一共展示了Control::saveState方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveState
public function saveState(array &$params, $reflection = NULL)
{
return $this->control->saveState($params, $reflection);
}
示例2: saveState
/**
* Save params
* @param array
* @return void
*/
public function saveState(array & $params)
{
parent::saveState($params);
if (isset($params['order'])) {
$params['order'] = implode('.', $params['order']);
}
}
示例3: saveState
/**
* @param array $params
* @param \Nette\Application\UI\PresenterComponentReflection $reflection
* @throws \Nette\Application\UI\InvalidLinkException
*/
public function saveState(array &$params, $reflection = null)
{
if ($this->hasFilteringForm() && !empty($this->filteringData)) {
foreach ($this->filteringData as $column => $value) {
if (array_key_exists($column, $params)) {
continue;
}
if ((string) $this->filteringData[$column] === '') {
$params[$column] = null;
} else {
$params[$column] = $value;
}
}
}
parent::saveState($params, $reflection);
}
示例4: saveState
/**
* Save params
*
* @param array $prams
*/
public function saveState(array &$params)
{
parent::saveState($params);
if ($this->rememberState) {
$session = $this->getStateSession();
// backup component's state
if (!isset($session->initState)) {
$session->initState = ['page' => $this->page, 'more' => $this->more, 'order' => $this->order, 'filters' => $this->filters, 'itemsPerPage' => $this->itemsPerPage];
}
// save component's state into session
$session->currentState = $params;
$session->setExpiration($this->timeout);
}
}
示例5: saveState
/**
* Save state function (TODO)
*/
public function saveState(array &$params)
{
parent::saveState($params);
}
示例6: saveState
/**
* Saves state informations for next request.
* @param array
* @param PresenterComponentReflection (internal, used by Presenter)
* @return void
*/
public function saveState(array &$params, $reflection = NULL)
{
parent::saveState($params, $reflection);
if ($this->rememberState) {
$session = $this->getStateSession();
foreach ($this->getPersistentParams() as $name) {
$session[$name] = $this->{$name};
}
$session->setExpiration($this->timeout);
}
}