if (!
$detail) { $detail =
new Detail();
$detail->
setKind(1
);
$detail->
setArticle($article);
$article->
setMainDetail($detail);
} if (empty($data['mainDetail'
])) { $data['mainDetail'
] =
[];
} $data['mainDetail'
] =
$this->
getVariantResource()->
prepareMainVariantData($data['mainDetail'
],
$article,
$detail);
return $data;
} /**
* Short method to completely generate all images from a product, main images and variant images
*
* @param bool $force Force all images to be regenerated
*
* @see Article::generateMainThumbnails
* @see Article::generateVariantImages
*/