61 $productImages =
$product->getMediaAttributeValues();
62 if (!isset(
$image[
'types'])) {
63 $image[
'types'] = array_keys($productImages,
$image[
'file']);
65 $entry = $this->mediaGalleryEntryFactory->create();
66 $this->dataObjectHelper->populateWithArray(
69 \
Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface::class
71 if (isset(
$image[
'value_id'])) {
72 $entry->setId(
$image[
'value_id']);
84 'value_id' => $entry->
getId(),
__construct(\Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory $mediaGalleryEntryFactory, \Magento\Framework\Api\DataObjectHelper $dataObjectHelper)
convertFromMediaGalleryEntryContentInterface(ImageContentInterface $content=null)
convertFrom(ProductAttributeMediaGalleryEntryInterface $entry)
const BASE64_ENCODED_DATA
convertTo(Product $product, array $rowData)
$mediaGalleryEntryFactory