Ojs\JournalBundle\Controller\JournalPostController::showAction PHP Метод

showAction() публичный Метод

Finds and displays a JournalPost entity.
public showAction ( JournalPost $journalPost ) : Response
$journalPost Ojs\JournalBundle\Entity\JournalPost
Результат 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]);
    }