Sulu\Bundle\WebsiteBundle\Sitemap\SitemapGeneratorInterface::generate PHP Method

generate() public method

Generates a sitemap for given webspace.
public generate ( string $webspaceKey, string $locale, boolean $flat = false ) : WebspaceSitemap
$webspaceKey string
$locale string
$flat boolean
return WebspaceSitemap
    public function generate($webspaceKey, $locale, $flat = false);

Usage Example

Ejemplo n.º 1
0
 /**
  * {@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();
 }
All Usage Examples Of Sulu\Bundle\WebsiteBundle\Sitemap\SitemapGeneratorInterface::generate
SitemapGeneratorInterface