$mapping =
$this->
getVariantMappingOfImage($image,
$variant);
if ($mapping) { $this->
getManager()->
remove($mapping);
} } } return $data;
} $images =
$this->
checkDataReplacement( $variant->
getImages(),
$data,
'images',
true
);
foreach ($data['images'
] as $imageData) { // Check if a media id was passed.
if (isset($imageData['mediaId'
])) { // First check if the media object is already assigned to the product
$image =
$this->
getAvailableMediaImage( $article->
getImages(),