Sulu\Bundle\MediaBundle\Search\Subscriber\MediaSearchSubscriber::getImageUrl PHP Method

getImageUrl() private method

TODO: The media API needs to be improved here.
private getImageUrl ( $media, $locale )
    private function getImageUrl($media, $locale)
    {
        $mediaApi = new Media($media, $locale);
        $this->mediaManager->addFormatsAndUrl($mediaApi);
        $formats = $mediaApi->getThumbnails();
        if (!isset($formats[$this->searchImageFormat])) {
            $this->logger->warning(sprintf('Media with ID "%s" does not have thumbnail format "%s". This thumbnail would be used by the search results.', $media->getId(), $this->searchImageFormat));
            return;
        }
        return $formats[$this->searchImageFormat];
    }