Ojs\JournalBundle\Controller\SectionController::newAction PHP Method

newAction() public method

Displays a form to create a new Section entity.
public newAction ( ) : Response
return Symfony\Component\HttpFoundation\Response
    public function newAction()
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('CREATE', $journal, 'sections')) {
            throw new AccessDeniedException("You are not authorized for create section on this journal!");
        }
        $entity = new Section();
        $form = $this->createCreateForm($entity, $journal);
        return $this->render('OjsJournalBundle:Section:new.html.twig', array('entity' => $entity, 'form' => $form->createView()));
    }