/** * Finds and displays a JournalPost entity. * * @param JournalPost $journalPost * @return \Symfony\Component\HttpFoundation\Response */ public function showAction(JournalPost $journalPost) { $journal = $this->get('ojs.journal_service')->getSelectedJournal(); if (!$this->isGranted('VIEW', $journal, 'posts')) { throw new AccessDeniedException("You are not authorized for this post!"); } $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_post' . $journalPost->getId()); return $this->render('OjsJournalBundle:JournalPost:show.html.twig', ['entity' => $journalPost, 'token' => $token]); }