Ojs\JournalBundle\Controller\JournalThemeController::showAction PHP Method

showAction() public method

Finds and displays a Theme entity.
public showAction ( integer $id ) : Response
$id integer
return Symfony\Component\HttpFoundation\Response
    public function showAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('VIEW', $journal, 'theme')) {
            throw new AccessDeniedException("You are not authorized for view this page");
        }
        /** @var JournalTheme $entity */
        $entity = $em->getRepository('OjsJournalBundle:JournalTheme')->find($id);
        $this->throw404IfNotFound($entity);
        $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_theme' . $entity->getId());
        return $this->render('OjsJournalBundle:Theme:show.html.twig', array('entity' => $entity, 'token' => $token));
    }