$this->mediaRepository->
create($media, Context::
createDefaultContext());
$mediaIds =
$ids->
all();
$pages =
[];
$pages[] =
(new LayoutBuilder($ids, 'page-1'
)) ->
image('media-1'
) ->
image('media-2'
) ->
build();
$pages[] =
(new LayoutBuilder($ids, 'page-2'
)) ->
imageSlider(['media-3', 'media-4'
]) ->
imageSlider(['media-4', 'media-5'
]) ->
imageGallery(['media-6', 'media-7', 'media-8'
]) ->
build();
// create a product with image slider, and image override
$product =
(new ProductBuilder($ids, 'product-1'
)) ->
price(100
) ->
layout('page-2'
) ->
slot( 'slot-1',
[