private function getCustomUrlsForEnvironment(Portal $portal, Environment $environment, Context $context)
    {
        $customUrls = [];
        foreach ($environment->getCustomUrls() as $customUrl) {
            $customUrl = $context->accept($customUrl);
            $customUrl['locales'] = $context->accept($portal->getLocalizations());
            $customUrls[] = $customUrl;
        }

        return $customUrls;
    }