/** Signál pre vymazanie komentarov */ public function handleVymazKomentare() { if ($this->allowed_delete_komentare) { $this->oznam_komentar->vymazKomentar($this->id_oznam); } if (!$this->presenter->isAjax()) { $this->redirect('this'); } else { $this->redrawControl('koment'); } }
/** * Spracovanie formulara pre pridanie komentara * @param Nette\Application\UI\Form $form */ public function onZapisKomentar(Nette\Application\UI\Form $form) { $this->oznam_komentar->uloz($form->getValues()); if (!$this->presenter->isAjax()) { $this->redirect('this'); } else { $this->redrawControl('koment'); } }