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

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

Finds and displays a JournalAnnouncement entity.
public showAction ( integer $id ) : Response
$id integer
Результат Symfony\Component\HttpFoundation\Response
    public function showAction($id)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        /** @var JournalAnnouncement $entity */
        $entity = $this->getDoctrine()->getRepository('OjsJournalBundle:JournalAnnouncement')->find($id);
        $this->throw404IfNotFound($entity);
        if (!$this->isGranted('VIEW', $journal, 'announcements')) {
            throw new AccessDeniedException("You are not authorized for this page!");
        }
        $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_announcement' . $entity->getId());
        return $this->render('OjsJournalBundle:JournalAnnouncement:show.html.twig', ['entity' => $entity, 'token' => $token]);
    }