Sulu\Component\Webspace\Manager\WebspaceManagerInterface::findUrlsByResourceLocator PHP Method

findUrlsByResourceLocator() public method

Returns all possible urls for resourcelocator.
public findUrlsByResourceLocator ( string $resourceLocator, string $environment, string $languageCode, null | string $webspaceKey = null, null | string $domain = null, string $scheme = 'http' ) : array
$resourceLocator string
$environment string
$languageCode string
$webspaceKey null | string
$domain null | string
$scheme string
return array
    public function findUrlsByResourceLocator($resourceLocator, $environment, $languageCode, $webspaceKey = null, $domain = null, $scheme = 'http');

Usage Example

 /**
  * {@inheritdoc}
  */
 public function handle($workload)
 {
     /** @var PageDocument $document */
     $document = $this->documentManager->find($workload['uuid'], $workload['locale']);
     $urls = $this->webspaceManager->findUrlsByResourceLocator($document->getResourceSegment(), $this->environment, $workload['locale'], $workload['webspaceKey']);
     foreach ($urls as $url) {
         $this->client->get($url)->send();
     }
 }
All Usage Examples Of Sulu\Component\Webspace\Manager\WebspaceManagerInterface::findUrlsByResourceLocator