src/Sulu/Bundle/CustomUrlBundle/Controller/CustomUrlController.php
public function getAction($webspace, $id, Request $request)
    {
        $document = $this->get('sulu_custom_urls.manager')->find($id);

        // FIXME without this target-document will not be loaded (for serialization)
        // - issue https://github.com/sulu-io/sulu-document-manager/issues/71
        if (null !== $document->getTargetDocument()) {
            $document->getTargetDocument()->getTitle();
        }

        $view = $this->view($document);

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

        return $this->handleView($view);
    }
public function getAction($webspace, $id, Request $request)
    {
        $document = $this->get('sulu_custom_urls.manager')->find($id);

        // FIXME without this target-document will not be loaded (for serialization)
        // - issue https://github.com/sulu-io/sulu-document-manager/issues/71
        if (null !== $document->getTargetDocument()) {
            $document->getTargetDocument()->getTitle();
        }

        $view = $this->view($document);

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

        return $this->handleView($view);
    }
public function getAction ( $ webspace , $ id , Request $ request ) { $ document = $ this -> get ( 'sulu_custom_urls.manager' ) -> find ( $ id ) ; // FIXME without this target-document will not be loaded (for serialization) // - issue https://github.com/sulu-io/sulu-document-manager/issues/71 if ( null !== $ document -> getTargetDocument ( ) ) { $ document -> getTargetDocument ( ) -> getTitle ( ) ; } $ view = $ this -> view ( $ document ) ; $ context = new Context ( ) ; $ context -> setGroups ( [ 'defaultCustomUrl' , 'fullRoute' ] ) ; $ view -> setContext ( $ context ) ; return $ this -> handleView ( $ view ) ; }
Returns a single custom-url identified by uuid.

@param string $webspace
@param string $id
@param Request $request

@return Response
Returns a single custom - url identified by uuid .