Ojs\JournalBundle\Controller\IssueController::editAction PHP Method

editAction() public method

Displays a form to edit an existing Issue entity.
public editAction ( integer $id ) : Response
$id integer
return Symfony\Component\HttpFoundation\Response
    public function editAction($id)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('EDIT', $journal, 'issues')) {
            throw new AccessDeniedException("You are not authorized for edit this journal's issue!");
        }
        $em = $this->getDoctrine()->getManager();
        /** @var Issue $entity */
        $entity = $em->getRepository('OjsJournalBundle:Issue')->find($id);
        $this->throw404IfNotFound($entity);
        $editForm = $this->createEditForm($entity, $journal->getId());
        return $this->render('OjsJournalBundle:Issue:edit.html.twig', ['entity' => $entity, 'edit_form' => $editForm->createView()]);
    }