protected function EntityUrlGeneratorBase::getAlternateUrlsForAllLanguages 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::getAlternateUrlsForAllLanguages()
Parameters
\Drupal\Core\Url $url_object:
Return value
array
1 call to EntityUrlGeneratorBase::getAlternateUrlsForAllLanguages()
- EntityUrlGeneratorBase::getUrlVariants in src/
Plugin/ simple_sitemap/ UrlGenerator/ EntityUrlGeneratorBase.php
File
- src/
Plugin/ simple_sitemap/ UrlGenerator/ EntityUrlGeneratorBase.php, line 179
Class
- EntityUrlGeneratorBase
- Class EntityUrlGeneratorBase
Namespace
Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGeneratorCode
protected function getAlternateUrlsForAllLanguages(Url $url_object) : array {
$alternate_urls = [];
if ($url_object
->access($this->anonUser)) {
foreach ($this->languages as $language) {
if (!isset($this->settings
->get('excluded_languages')[$language
->getId()]) || $language
->isDefault()) {
$alternate_urls[$language
->getId()] = $this
->replaceBaseUrlWithCustom($url_object
->setAbsolute()
->setOption('language', $language)
->toString());
}
}
}
return $alternate_urls;
}