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

newAction() 공개 메소드

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