Ojs\JournalBundle\Controller\JournalContactController::editAction PHP Метод

editAction() публичный Метод

Displays a form to edit an existing JournalContact entity.
public editAction ( integer $id ) : Response
$id integer
Результат Symfony\Component\HttpFoundation\Response
    public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('EDIT', $journal, 'contacts')) {
            throw new AccessDeniedException("You are not authorized for view this page!");
        }
        /** @var JournalContact $entity */
        $entity = $em->getRepository('OjsJournalBundle:JournalContact')->find($id);
        $this->throw404IfNotFound($entity);
        $editForm = $this->createEditForm($entity, $journal->getId());
        $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_journal_contact' . $entity->getId());
        return $this->render('OjsJournalBundle:JournalContact:edit.html.twig', array('entity' => $entity, 'edit_form' => $editForm->createView(), 'token' => $token));
    }