src/Sulu/Bundle/PageBundle/EventListener/WebspaceSerializeEventSubscriber.php
private function appendCustomUrls(Webspace $webspace, Context $context, JsonSerializationVisitor $visitor)
    {
        $customUrls = [];
        foreach ($webspace->getPortals() as $portal) {
            $customUrls = array_merge(
                $customUrls,
                $this->getCustomUrlsForEnvironment($portal, $portal->getEnvironment($this->environment), $context)
            );
        }

        $customUrls = $context->accept($customUrls);
        $visitor->addData('customUrls', $customUrls);
    }
private function appendCustomUrls(Webspace $webspace, Context $context, JsonSerializationVisitor $visitor)
    {
        $customUrls = [];
        foreach ($webspace->getPortals() as $portal) {
            $customUrls = array_merge(
                $customUrls,
                $this->getCustomUrlsForEnvironment($portal, $portal->getEnvironment($this->environment), $context)
            );
        }

        $customUrls = $context->accept($customUrls);
        $visitor->addData('customUrls', $customUrls);
    }
private function appendCustomUrls ( Webspace $ webspace , Context $ context , JsonSerializationVisitor $ visitor ) { $ customUrls = [ ] ; foreach ( $ webspace -> getPortals ( ) as $ portal ) { $ customUrls = array_merge ( $ customUrls , $ this -> getCustomUrlsForEnvironment ( $ portal , $ portal -> getEnvironment ( $ this -> environment ) , $ context ) ) ; } $ customUrls = $ context -> accept ( $ customUrls ) ; $ visitor -> addData ( 'customUrls' , $ customUrls ) ; }
Extract custom-url and add them to serialization.

@param Webspace $webspace
@param Context $context
@param JsonSerializationVisitor $visitor
Extract custom - url and add them to serialization .