src/Sulu/Bundle/CustomUrlBundle/Controller/CustomUrlController.php
public function postAction($webspace, Request $request)
    {
        $document = $this->get('sulu_custom_urls.manager')->create(
            $webspace,
            $request->request->all(),
            $this->getRequestParameter($request, 'targetLocale', true)
        );
        $this->get('sulu_document_manager.document_manager')->flush();

        $context = new Context();
        $context->setGroups(['defaultCustomUrl', 'fullRoute']);

        return $this->handleView($this->view($document)->setContext($context));
    }
public function postAction($webspace, Request $request)
    {
        $document = $this->get('sulu_custom_urls.manager')->create(
            $webspace,
            $request->request->all(),
            $this->getRequestParameter($request, 'targetLocale', true)
        );
        $this->get('sulu_document_manager.document_manager')->flush();

        $context = new Context();
        $context->setGroups(['defaultCustomUrl', 'fullRoute']);

        return $this->handleView($this->view($document)->setContext($context));
    }
public function postAction ( $ webspace , Request $ request ) { $ document = $ this -> get ( 'sulu_custom_urls.manager' ) -> create ( $ webspace , $ request -> request -> all ( ) , $ this -> getRequestParameter ( $ request , 'targetLocale' , true ) ) ; $ this -> get ( 'sulu_document_manager.document_manager' ) -> flush ( ) ; $ context = new Context ( ) ; $ context -> setGroups ( [ 'defaultCustomUrl' , 'fullRoute' ] ) ; return $ this -> handleView ( $ this -> view ( $ document ) -> setContext ( $ context ) ) ; }
Create a new custom-url object.

@param string $webspace
@param Request $request

@return Response
Create a new custom - url object .