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

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

Displays a form to create a new JournalContact entity.
public newAction ( ) : Response
Результат Symfony\Component\HttpFoundation\Response
    public function newAction()
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('CREATE', $journal, 'contacts')) {
            throw new AccessDeniedException("You are not authorized for view this page!");
        }
        $entity = new JournalContact();
        $form = $this->createCreateForm($entity, $journal->getId());
        return $this->render('OjsJournalBundle:JournalContact:new.html.twig', array('entity' => $entity, 'form' => $form->createView()));
    }