Esempio n. 1
0
 /**
  * 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;
 }
Esempio n. 2
0
 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();
     }
 }
Esempio n. 3
0
 public function sendPayload()
 {
     // Send flash messages in payload
     $this->payload->flashes = $this->exportFlashSession();
     parent::sendPayload();
 }
Esempio n. 4
0
 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();
 }