getMediaUrl() public method

Return the url to an specific format of an media.
public getMediaUrl ( integer $id, string $fileName, array $options, string $format, integer $version, integer $subVersion ) : string
$id integer
$fileName string
$options array
$format string
$version integer
$subVersion integer
return string
Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function getFormats($id, $fileName, $storageOptions, $version, $subVersion, $mimeType)
 {
     $formats = [];
     if ($this->checkMimeTypeSupported($mimeType)) {
         foreach ($this->formats as $format) {
             $formats[$format['key']] = $this->formatCache->getMediaUrl($id, $this->replaceExtension($fileName, $mimeType), $storageOptions, $format['key'], $version, $subVersion);
         }
     }
     return $formats;
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function getFormats($id, $fileName, $storageOptions, $version, $mimeType)
 {
     $formats = [];
     if (in_array($mimeType, $this->previewMimeTypes)) {
         foreach ($this->formats as $format) {
             $formats[$format['name']] = $this->formatCache->getMediaUrl($id, $this->replaceExtension($fileName, $this->getImageExtension($fileName)), $storageOptions, $format['name'], $version);
         }
     }
     return $formats;
 }