public function getProductConfigurator( BaseProduct
$product,
ShopContextInterface
$context,
array
$selection ) { $configurator =
$this->configuratorGateway->
get($product,
$context);
$availableProductOptions =
$this->configuratorGateway->
getAvailableConfigurations($product);
$media =
[];
if (((int) $configurator->
getType()) === self::CONFIGURATOR_TYPE_PICTURE
) { $media =
$this->configuratorGateway->
getConfiguratorMedia( $product,
$context );
} $onlyOneGroup = \
count($configurator->
getGroups()) === self::CONFIGURATOR_TYPE_SELECTION;
foreach ($configurator->
getGroups() as $group) { $group->
setSelected( isset($selection[$group->
getId()]) );