Sulu\Component\Webspace\Url\WebspaceUrlProviderInterface::getUrls PHP Method

getUrls() public method

Returns urls for given webspace.
public getUrls ( Webspace $webspace, string $environment ) : Url[]
$webspace Sulu\Component\Webspace\Webspace
$environment string
return Sulu\Component\Webspace\Url[]
    public function getUrls(Webspace $webspace, $environment);

Usage Example

 /**
  * Extract urls and add them to serialization.
  *
  * @param Webspace $webspace
  * @param Context $context
  * @param JsonSerializationVisitor $visitor
  */
 private function appendUrls(Webspace $webspace, Context $context, JsonSerializationVisitor $visitor)
 {
     $urls = $this->webspaceUrlProvider->getUrls($webspace, $this->environment);
     $urls = $context->accept($urls);
     $visitor->addData('urls', $urls);
 }
WebspaceUrlProviderInterface