public function get($mediaId, $formatKey)
{
if (!isset($this->formats[$formatKey])) {
throw new FormatNotFoundException($formatKey);
}
$media = $this->mediaManager->getEntityById($mediaId);
$fileVersion = $this->getFileVersionForMedia($media);
/** @var FormatOptions $formatOptions */
$formatOptions = $this->formatOptionsRepository->find(['fileVersion' => $fileVersion, 'formatKey' => $formatKey]);
if (!isset($formatOptions)) {
return [];
}
return $this->entityToArray($formatOptions);
}