1 | <?php |
||
19 | class ProductBundleManipulator implements ProductBundleManipulatorInterface |
||
20 | { |
||
21 | /** @var FactoryInterface */ |
||
22 | private $productBundleSlotFactory; |
||
23 | |||
24 | /** @var ProductBundleInterface */ |
||
25 | private $productBundle; |
||
26 | |||
27 | public function __construct(FactoryInterface $productBundleSlotFactory) |
||
31 | |||
32 | public function setProductBundle(ProductBundleInterface $productBundle): void |
||
36 | |||
37 | public function getProductBundle(): ?ProductBundleInterface |
||
41 | |||
42 | /** |
||
43 | * @param ProductInterface[] $products |
||
44 | */ |
||
45 | public function addSlot( |
||
55 | |||
56 | private function createSlot(string $slotName): ProductBundleSlotInterface |
||
64 | |||
65 | private function applyOptionsToSlot( |
||
76 | |||
77 | private function addSlotToBundle(ProductBundleSlotInterface $slot): void |
||
81 | |||
82 | private function setPresentationSlotOnBundle(ProductBundleSlotInterface $slot): void |
||
86 | |||
87 | /** |
||
88 | * @param ProductInterface[] $products |
||
89 | */ |
||
90 | private function addProductsToSlot(array $products, ProductBundleSlotInterface $slot): void |
||
96 | |||
97 | private function addProductToSlot(ProductInterface $product, ProductBundleSlotInterface $slot): void |
||
101 | } |
||
102 |