Networking\InitCmsBundle\Controller\MediaAdminController::createAction PHP Method

createAction() public method

public createAction ( ) : Symfony\Bundle\FrameworkBundle\Controller\Response | Response
return Symfony\Bundle\FrameworkBundle\Controller\Response | Symfony\Component\HttpFoundation\Response
    public function createAction()
    {
        if (false === $this->admin->isGranted('CREATE')) {
            throw new AccessDeniedException();
        }
        $parameters = $this->admin->getPersistentParameters();
        if (!$parameters['provider']) {
            return $this->render('NetworkingInitCmsBundle:MediaAdmin:select_provider.html.twig', array('providers' => $this->get('sonata.media.pool')->getProvidersByContext($this->get('request')->get('context', $this->get('sonata.media.pool')->getDefaultContext())), 'base_template' => $this->getBaseTemplate(), 'admin' => $this->admin, 'action' => 'create'));
        }
        return parent::createAction();
    }