Ojs\JournalBundle\Controller\BlockController::newAction PHP Метод

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

Displays a form to create a new Block entity.
public newAction ( )
    public function newAction()
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('CREATE', $journal, 'block')) {
            throw new AccessDeniedException("You not authorized for this page");
        }
        $entity = new Block();
        $form = $this->createCreateForm($entity, $journal);
        return $this->render('OjsJournalBundle:Block:new.html.twig', array('entity' => $entity, 'form' => $form->createView()));
    }