public function generateThumbUrl(MediaInterface $media)
    {
        $path = null;

        if ($media->getType() === MediaTypes::IMAGE) {
            $path = $this->cacheManager->getBrowserPath($media->getPath(), 'media_thumb');
        } else {
            $path = $this->generateFileThumb($media);
        }

        if (null === $path) {
            $path = '/bundles/ekynamedia/img/file.jpg';
        }

        return $path;
    }
public function generateThumbUrl(MediaInterface $media)
    {
        $path = null;

        if ($media->getType() === MediaTypes::IMAGE) {
            $path = $this->cacheManager->getBrowserPath($media->getPath(), 'media_thumb');
        } else {
            $path = $this->generateFileThumb($media);
        }

        if (null === $path) {
            $path = '/bundles/ekynamedia/img/file.jpg';
        }

        return $path;
    }
public function generateThumbUrl ( MediaInterface $ media ) { $ path = null ; if ( $ media -> getType ( ) === MediaTypes :: IMAGE ) { $ path = $ this -> cacheManager -> getBrowserPath ( $ media -> getPath ( ) , 'media_thumb' ) ; } else { $ path = $ this -> generateFileThumb ( $ media ) ; } if ( null === $ path ) { $ path = '/bundles/ekynamedia/img/file.jpg' ; } return $ path ; }
Generates a thumb for the given media.

@param MediaInterface $media
@return string
Generates a thumb for the given media .