Ojs\JournalBundle\Controller\JournalUserController::editUserAction PHP Метод

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

public editUserAction ( $id )
    public function editUserAction($id)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        $em = $this->getDoctrine()->getManager();
        // Although 'id' column is unique, looking for a matching journal as well is beneficial security-wise
        /** @var JournalUser $entity */
        $entity = $em->getRepository('OjsJournalBundle:JournalUser')->find($id);
        $this->throw404IfNotFound($entity);
        if (!$this->isGranted('EDIT', $journal, 'userRole')) {
            throw new AccessDeniedException("You not authorized to remove this user from the journal.");
        }
        $editForm = $this->createEditForm($entity);
        return $this->render('OjsJournalBundle:JournalUser:edit.html.twig', array('entity' => $entity, 'edit_form' => $editForm->createView()));
    }