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

editAction() public method

Displays a form to edit an existing Block entity.
public editAction ( Block $block ) : Response
$block Ojs\JournalBundle\Entity\Block
return Symfony\Component\HttpFoundation\Response
    public function editAction(Block $block)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('EDIT', $journal, 'block')) {
            throw new AccessDeniedException("You not authorized for edit this page!");
        }
        $editForm = $this->createEditForm($block);
        return $this->render('OjsJournalBundle:Block:edit.html.twig', array('entity' => $block, 'edit_form' => $editForm->createView()));
    }