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

newAction() public method

Displays a form to create a new PublisherTheme entity.
public newAction ( integer $publisherId ) : Response
$publisherId integer
return Symfony\Component\HttpFoundation\Response
    public function newAction($publisherId)
    {
        $em = $this->getDoctrine()->getManager();
        $publisher = $em->getRepository('OjsJournalBundle:Publisher')->find($publisherId);
        $this->throw404IfNotFound($publisher);
        if (!$this->isGrantedForPublisher($publisher)) {
            throw new AccessDeniedException("You are not authorized for this page!");
        }
        $entity = new PublisherTheme();
        $form = $this->createCreateForm($entity, $publisher);
        return $this->render('OjsJournalBundle:ManagerPublisherTheme:new.html.twig', array('entity' => $entity, 'publisher' => $publisher, 'form' => $form->createView()));
    }