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

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

Displays a form to edit an existing Theme 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, 'theme')) {
            throw new AccessDeniedException("You are not authorized for view this page");
        }
        /** @var JournalTheme $entity */
        $entity = $em->getRepository('OjsJournalBundle:JournalTheme')->find($id);
        $this->throw404IfNotFound($entity);
        $editForm = $this->createEditForm($entity);
        return $this->render('OjsJournalBundle:Theme:edit.html.twig', array('entity' => $entity, 'edit_form' => $editForm->createView()));
    }