Ojs\AdminBundle\Controller\AdminContactController::showAction PHP Method

showAction() public method

Finds and displays a JournalContact entity.
public showAction ( Request $request, integer $id ) : Response
$request Symfony\Component\HttpFoundation\Request
$id integer
return Symfony\Component\HttpFoundation\Response
    public function showAction(Request $request, $id)
    {
        $em = $this->getDoctrine()->getManager();
        /** @var JournalContact $entity */
        $entity = $em->getRepository('OjsJournalBundle:JournalContact')->findOneBy(['id' => $id]);
        $this->throw404IfNotFound($entity);
        $entity->setDefaultLocale($request->getDefaultLocale());
        $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_admin_contact' . $entity->getId());
        return $this->render('OjsAdminBundle:AdminContact:show.html.twig', array('entity' => $entity, 'token' => $token));
    }