20 private $mediaGalleryEntryConvertersCollection;
25 public function __construct(array $mediaGalleryEntryConvertersCollection)
27 foreach ($mediaGalleryEntryConvertersCollection as $converter) {
29 throw new \InvalidArgumentException(
30 __(
'Media Gallery converter should be an instance of EntryConverterInterface.')
34 $this->mediaGalleryEntryConvertersCollection = $mediaGalleryEntryConvertersCollection;
46 foreach ($this->mediaGalleryEntryConvertersCollection as $converter) {
47 if ($converter->getMediaEntryType() == $mediaType) {
51 throw new \Magento\Framework\Exception\LocalizedException(
52 __(
'There is no MediaGalleryEntryConverter for given type')
__construct(array $mediaGalleryEntryConvertersCollection)
getConverterByMediaType($mediaType)