protected function DefaultSitemapGenerator::addAlternateUrls in Simple XML sitemap 4.x
Same name and namespace in other branches
- 8.3 src/Plugin/simple_sitemap/SitemapGenerator/DefaultSitemapGenerator.php \Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator\DefaultSitemapGenerator::addAlternateUrls()
Adds all translation variant URLs as alternate URLs to a URL.
Parameters
array $alternate_urls:
1 call to DefaultSitemapGenerator::addAlternateUrls()
- DefaultSitemapGenerator::addUrl in src/
Plugin/ simple_sitemap/ SitemapGenerator/ DefaultSitemapGenerator.php - Adds a URL element to the sitemap.
File
- src/
Plugin/ simple_sitemap/ SitemapGenerator/ DefaultSitemapGenerator.php, line 137
Class
- DefaultSitemapGenerator
- Class DefaultSitemapGenerator
Namespace
Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGeneratorCode
protected function addAlternateUrls(array $alternate_urls) : void {
foreach ($alternate_urls as $language_id => $alternate_url) {
$this->writer
->startElement('xhtml:link');
$this
->addAlternateUrl($language_id, $alternate_url);
$this->writer
->endElement();
}
}