public function SitemapGeneratorBase::getSitemapUrl in Simple XML sitemap 8.3
Parameters
null $delta:
Return value
\Drupal\Core\GeneratedUrl|string
Overrides SitemapGeneratorInterface::getSitemapUrl
1 call to SitemapGeneratorBase::getSitemapUrl()
- SitemapGeneratorBase::getIndexXml in src/
Plugin/ simple_sitemap/ SitemapGenerator/ SitemapGeneratorBase.php
File
- src/
Plugin/ simple_sitemap/ SitemapGenerator/ SitemapGeneratorBase.php, line 332
Class
- SitemapGeneratorBase
- Class SitemapGeneratorBase @package Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator
Namespace
Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGeneratorCode
public function getSitemapUrl($delta = NULL) {
$parameters = NULL !== $delta ? [
'page' => $delta,
] : [];
$url = $this
->isDefaultVariant() ? Url::fromRoute('simple_sitemap.sitemap_default', $parameters, $this
->getSitemapUrlSettings()) : Url::fromRoute('simple_sitemap.sitemap_variant', $parameters + [
'variant' => $this->sitemapVariant,
], $this
->getSitemapUrlSettings());
return $url
->toString();
}