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

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

Displays a form to edit an existing IssueFile entity.
public editAction ( $id ) : Response
$id
Результат Symfony\Component\HttpFoundation\Response
    public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        /** @var IssueFile $entity */
        $entity = $em->getRepository('OjsJournalBundle:IssueFile')->find($id);
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('EDIT', $journal, 'issues')) {
            throw new AccessDeniedException('You are not authorized for edit this  issue file!');
        }
        /** @var Issue $issue */
        $issue = $em->getRepository('OjsJournalBundle:Issue')->find($entity->getIssue()->getId());
        $this->throw404IfNotFound($issue);
        $this->throw404IfNotFound($entity);
        $editForm = $this->createEditForm($entity)->add('edit', 'submit', array('label' => 'e'));
        return $this->render('OjsJournalBundle:IssueFile:edit.html.twig', array('entity' => $entity, 'edit_form' => $editForm->createView()));
    }