Sulu\Component\Webspace\PortalInformation::getWebspaceKey PHP Method

getWebspaceKey() public method

Returns key of webspace.
public getWebspaceKey ( )
    public function getWebspaceKey()
    {
        if (null === $this->webspace) {
            return;
        }
        return $this->webspace->getKey();
    }

Usage Example

Example #1
0
 /**
  * Render sitemap for provider.
  *
  * @param string $alias
  * @param PortalInformation $portalInformation
  * @param string $scheme
  */
 private function dumpProviderSitemap($alias, PortalInformation $portalInformation, $scheme)
 {
     $maxPage = $this->sitemapProviderPool->getProvider($alias)->getMaxPage();
     for ($page = 1; $page <= $maxPage; ++$page) {
         $sitemap = $this->sitemapRenderer->renderSitemap($alias, $page, $portalInformation->getLocale(), $portalInformation->getPortal(), $portalInformation->getHost(), $scheme);
         $this->dumpFile($this->getDumpPath($scheme, $portalInformation->getWebspaceKey(), $portalInformation->getLocale(), $portalInformation->getHost(), $alias, $page), $sitemap);
     }
 }