public function getImages(MediaInterface $media, array $filters)
    {
        $key = $media->getImagesCacheKey();
        if (!$images = $this->cache->fetch($key)) {
            $provider = $this->getProvider($media);

            $reference = $provider->getThumb($media);

            $images = [];
            foreach ($filters as $filter) {
                if ($media->getContentType() == 'image/svg+xml') {
                    $images[$filter] = $provider->getUrl($media);
                } else {
                    $images[$filter] = $this->cacheManager->getBrowserPath($reference, $filter);
                }
            }

            $this->cache->save($key, $images, 0);
        }

        return $images;
    }
public function getImages(MediaInterface $media, array $filters)
    {
        $key = $media->getImagesCacheKey();
        if (!$images = $this->cache->fetch($key)) {
            $provider = $this->getProvider($media);

            $reference = $provider->getThumb($media);

            $images = [];
            foreach ($filters as $filter) {
                if ($media->getContentType() == 'image/svg+xml') {
                    $images[$filter] = $provider->getUrl($media);
                } else {
                    $images[$filter] = $this->cacheManager->getBrowserPath($reference, $filter);
                }
            }

            $this->cache->save($key, $images, 0);
        }

        return $images;
    }
public function getImages ( MediaInterface $ media , array $ filters ) { $ key = $ media -> getImagesCacheKey ( ) ; if ( ! $ images = $ this -> cache -> fetch ( $ key ) ) { $ provider = $ this -> getProvider ( $ media ) ; $ reference = $ provider -> getThumb ( $ media ) ; $ images = [ ] ; foreach ( $ filters as $ filter ) { if ( $ media -> getContentType ( ) == 'image/svg+xml' ) { $ images [ $ filter ] = $ provider -> getUrl ( $ media ) ; } else { $ images [ $ filter ] = $ this -> cacheManager -> getBrowserPath ( $ reference , $ filter ) ; } } $ this -> cache -> save ( $ key , $ images , 0 ) ; } return $ images ; }
Gets the cached images if any. If the cache is not present, it generates images for all filters.

@param MediaInterface $media
@param array $filters

@return MediaInterface[]
Gets the cached images if any . If the cache is not present it generates images for all filters .