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

editAction() public method

Displays a form to edit an existing PersonTitle entity.
public editAction ( $id ) : Response
$id
return Symfony\Component\HttpFoundation\Response
    public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $entity = $em->getRepository('OjsJournalBundle:PersonTitle')->find($id);
        if (!$entity) {
            throw $this->createNotFoundException('Unable to find PersonTitle entity.');
        }
        $editForm = $this->createEditForm($entity);
        $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_admin_person_title' . $entity->getId());
        return $this->render('OjsAdminBundle:AdminPersonTitle:edit.html.twig', array('entity' => $entity, 'token' => $token, 'edit_form' => $editForm->createView()));
    }