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

newAction() public method

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