Sulu\Component\Content\Repository\Content::getWebspaceKey PHP Method

getWebspaceKey() public method

public getWebspaceKey ( ) : string
return string
    public function getWebspaceKey()
    {
        return $this->webspaceKey;
    }

Usage Example

Example #1
0
 /**
  * Returns new link item.
  *
  * @param Content $content
  * @param string $locale
  * @param string $scheme
  *
  * @return LinkItem
  */
 protected function getLinkItem(Content $content, $locale, $scheme)
 {
     $published = !empty($content->getPropertyWithDefault('published'));
     $url = $this->webspaceManager->findUrlByResourceLocator($content->getUrl(), $this->environment, $locale, $content->getWebspaceKey(), null, $scheme);
     return new LinkItem($content->getId(), $content->getPropertyWithDefault('title'), $url, $published);
 }