Ojs\JournalBundle\Controller\MailTemplateController::showAction PHP Méthode

showAction() public méthode

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