/**
* {@inheritdoc}
*/
public function sitemapFunction($locale = null, $webspaceKey = null)
{
if ($webspaceKey === null) {
$webspaceKey = $this->requestAnalyzer->getWebspace()->getKey();
}
if ($locale === null) {
$locale = $this->requestAnalyzer->getCurrentLocalization()->getLocalization();
}
return $this->sitemapGenerator->generate($webspaceKey, $locale)->getSitemap();
}