$this->
getManager()->
flush();
} /**
* Helper function which creates a new product image with the passed media object.
*
* @return Image
*/
public function createNewArticleImage(ProductModel
$article, MediaModel
$media) { $image =
new Image();
$image =
$this->
updateArticleImageWithMedia( $article,
$image,
$media );
$this->
getManager()->
persist($image);
$article->
getImages()->
add($image);
return $image;
} /**
* Helper function to map the media data into a product image
*
* @return Image
*/