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

editAction() public method

Displays a form to edit an existing JournalContact entity.
public editAction ( integer $id ) : Response
$id integer
return Symfony\Component\HttpFoundation\Response
    public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        /** @var JournalContact $entity */
        $entity = $em->getRepository('OjsJournalBundle:JournalContact')->findOneBy(['id' => $id]);
        $this->throw404IfNotFound($entity);
        $editForm = $this->createEditForm($entity);
        $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_admin_contact' . $entity->getId());
        return $this->render('OjsAdminBundle:AdminContact:edit.html.twig', array('entity' => $entity, 'edit_form' => $editForm->createView(), 'token' => $token));
    }