You are here

protected function UrlGeneratorBase::replaceBaseUrlWithCustom in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorBase.php \Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorBase::replaceBaseUrlWithCustom()
  2. 4.x src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorBase.php \Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorBase::replaceBaseUrlWithCustom()

Parameters

string $url:

Return value

string

4 calls to UrlGeneratorBase::replaceBaseUrlWithCustom()
EntityUrlGeneratorBase::getAlternateUrlsForAllLanguages in src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php
EntityUrlGeneratorBase::getAlternateUrlsForDefaultLanguage in src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php
EntityUrlGeneratorBase::getAlternateUrlsForTranslatedLanguages in src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php
EntityUrlGeneratorBase::getEntityImageData in src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php

File

src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorBase.php, line 90

Class

UrlGeneratorBase
Class UrlGeneratorBase @package Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator

Namespace

Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator

Code

protected function replaceBaseUrlWithCustom($url) {
  return !empty($this->settings['base_url']) ? str_replace($GLOBALS['base_url'], $this->settings['base_url'], $url) : $url;
}