1 | <?php |
||
10 | class ProductBundleCreator |
||
11 | { |
||
12 | /** @var FactoryInterface */ |
||
13 | private $productBundleFactory; |
||
14 | |||
15 | /** @var FactoryInterface */ |
||
16 | private $productBundleSlotFactory; |
||
17 | |||
18 | /** @var ProductBundleInterface */ |
||
19 | private $productBundle; |
||
20 | |||
21 | public function __construct( |
||
28 | |||
29 | public function createProductBundle(): ProductBundleCreator |
||
34 | |||
35 | public function getProductBundle(): ProductBundleInterface |
||
39 | |||
40 | public function addSlot(string $slotName, array $options = [], array $products = []): ProductBundleCreator |
||
52 | |||
53 | private function applyOptionsToSlot(array $options, ProductBundleSlotInterface $slot): void |
||
59 | |||
60 | private function addProductsToSlot(array $products, ProductBundleSlotInterface $slot): void |
||
66 | |||
67 | private function addProductToSlot(ProductInterface $product, ProductBundleSlotInterface $slot): void |
||
71 | } |
||
72 |