Sulu\Bundle\WebsiteBundle\Sitemap\SitemapProviderPoolInterface::getProviders PHP Method

getProviders() public method

Returns all providers.
public getProviders ( ) : Sulu\Bundle\WebsiteBundle\Sitemap\SitemapProviderInterface[]
return Sulu\Bundle\WebsiteBundle\Sitemap\SitemapProviderInterface[]
    public function getProviders();

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function dumpPortalInformation(PortalInformation $portalInformation, $scheme)
 {
     if (false !== strpos($portalInformation->getUrl(), '{host}')) {
         if (!$this->defaultHost) {
             return;
         }
         $portalInformation->setUrl(str_replace('{host}', $this->defaultHost, $portalInformation->getUrl()));
     }
     $dumpPath = $this->getIndexDumpPath($scheme, $portalInformation->getWebspaceKey(), $portalInformation->getLocale(), $portalInformation->getHost());
     $sitemap = $this->sitemapRenderer->renderIndex($portalInformation->getHost(), $scheme);
     if (!$sitemap) {
         $aliases = array_keys($this->sitemapProviderPool->getProviders());
         $this->dumpFile($dumpPath, $this->sitemapRenderer->renderSitemap(reset($aliases), 1, $portalInformation->getLocale(), $portalInformation->getPortal(), $portalInformation->getHost(), $scheme));
         return;
     }
     foreach ($this->sitemapProviderPool->getProviders() as $alias => $provider) {
         $this->dumpProviderSitemap($alias, $portalInformation, $scheme);
     }
     $this->dumpFile($dumpPath, $sitemap);
 }
All Usage Examples Of Sulu\Bundle\WebsiteBundle\Sitemap\SitemapProviderPoolInterface::getProviders