Ojs\JournalBundle\Controller\CitationController::newAction PHP Метод

newAction() публичный Метод

Displays a form to create a new Citation entity.
public newAction ( integer $articleId ) : Response
$articleId integer
Результат Symfony\Component\HttpFoundation\Response
    public function newAction($articleId)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        $this->throw404IfNotFound($journal);
        $event = new CitationNewEvent($journal->getId(), $articleId);
        $newEvent = $this->get('event_dispatcher')->dispatch(CitationEvents::CITATION_NEW, $event);
        $response = $newEvent->getResponse();
        if ($response !== null) {
            return $response;
        }
        if (!$this->isGranted('VIEW', $journal, 'articles')) {
            throw new AccessDeniedException("You not authorized for this page!");
        }
        $entity = new Citation();
        $form = $this->createCreateForm($entity, $articleId);
        return $this->render('OjsJournalBundle:Citation:new.html.twig', array('entity' => $entity, 'form' => $form->createView()));
    }