/** * Send refresh for page * @return bool * @throws \Nette\Application\AbortException */ public function refreshPage() { if ($this->isRequested()) { $this->presenter->payload->refresh = true; $this->presenter->sendPayload(); return true; } return false; }
public function handleSave() { $this->presenter = $this->getPresenter(); if ($this->presenter->isAjax()) { $request = $this->presenter->getRequest(); $result = $request->getPost(); foreach ($this->onSave as $call) { $call($result); } $this->presenter->payload->neco = $result; $this->presenter->sendPayload(); } }
public function sendPayload() { // Send flash messages in payload $this->payload->flashes = $this->exportFlashSession(); parent::sendPayload(); }
public function sendPayload() { $payload = $this->getPayload(); if (!$this->redirect && isset($payload->redirect)) { $this->onResponseHandler->markForward(); } if ($payload && isset($payload->snippets) && ($snippets = (array) $payload->snippets)) { ksort($snippets); uksort($snippets, function ($left, $right) { return substr_count($left, '-') <=> substr_count($right, '-'); }); $payload->snippets = $snippets; } parent::sendPayload(); }