Ojs\JournalBundle\Controller\JournalPageController::newAction PHP 메소드

newAction() 공개 메소드

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