/** * Displays a form to create a new IssueFile entity. */ public function newAction(Request $request, $issueId) { $journal = $this->get('ojs.journal_service')->getSelectedJournal(); if (!$this->isGranted('CREATE', $journal, 'issues')) { throw new AccessDeniedException('You are not authorized for create issue file for this journal!'); } $entity = new IssueFile(); $entity->setIssueId($issueId); $form = $this->createCreateForm($entity, $journal->getId()); return $this->render('OjsJournalBundle:IssueFile:new.html.twig', array('entity' => $entity, 'form' => $form->createView())); }