protected function EntityUrlGeneratorBase::getAlternateUrlsForDefaultLanguage in Simple XML sitemap 4.x
Same name and namespace in other branches
- 8.3 src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php \Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase::getAlternateUrlsForDefaultLanguage()
Parameters
\Drupal\Core\Url $url_object:
Return value
array
1 call to EntityUrlGeneratorBase::getAlternateUrlsForDefaultLanguage()
- EntityUrlGeneratorBase::getUrlVariants in src/
Plugin/ simple_sitemap/ UrlGenerator/ EntityUrlGeneratorBase.php
File
- src/
Plugin/ simple_sitemap/ UrlGenerator/ EntityUrlGeneratorBase.php, line 142
Class
- EntityUrlGeneratorBase
- Class EntityUrlGeneratorBase
Namespace
Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGeneratorCode
protected function getAlternateUrlsForDefaultLanguage(Url $url_object) : array {
$alternate_urls = [];
if ($url_object
->access($this->anonUser)) {
$alternate_urls[$this->defaultLanguageId] = $this
->replaceBaseUrlWithCustom($url_object
->setAbsolute()
->setOption('language', $this->languages[$this->defaultLanguageId])
->toString());
}
return $alternate_urls;
}