/** * (Dis)allows post for viewing * * @Privilege("show") * * @param int $id Guestbook post ID */ public function handleShow($id) { $news = $this->guestbook->showPost($id); if ($news->show) { $this->flashMessage("Příspěvek byl zobrazen"); } else { $this->flashMessage("Příspěvek byl odzobrazen"); } $this->redirect('Guestbook:'); }