1 | <?php |
||
13 | class ProductBundle implements ProductBundleInterface, ResourceInterface, CodeAwareInterface |
||
14 | { |
||
15 | /** @var int */ |
||
16 | private $id; |
||
17 | |||
18 | /** @var string|null */ |
||
19 | private $code; |
||
20 | |||
21 | /** @var string */ |
||
22 | private $name; |
||
23 | |||
24 | /** @var ProductBundleSlotInterface[]|Collection|ArrayCollection */ |
||
25 | private $slots; |
||
26 | |||
27 | /** @var ProductInterface */ |
||
28 | private $product; |
||
29 | |||
30 | /** |
||
31 | * ProductBundle constructor. |
||
32 | */ |
||
33 | public function __construct() |
||
37 | |||
38 | /** |
||
39 | * @return int |
||
40 | */ |
||
41 | public function getId(): int |
||
45 | |||
46 | /** |
||
47 | * @return string|null |
||
48 | */ |
||
49 | public function getCode(): ?string |
||
53 | |||
54 | /** |
||
55 | * @param string|null $code |
||
56 | */ |
||
57 | public function setCode(?string $code): void |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | public function getName(): ?string |
||
69 | |||
70 | /** |
||
71 | * @param string $name |
||
72 | */ |
||
73 | public function setName(?string $name): void |
||
77 | |||
78 | /** |
||
79 | * @param ProductBundleSlotInterface $slot |
||
80 | */ |
||
81 | public function addSlot(ProductBundleSlotInterface $slot): void |
||
82 | { |
||
83 | $this->slots->add($slot); |
||
84 | } |
||
85 | |||
86 | /** |
||
87 | * @return ProductBundleSlotInterface[]|Collection|ArrayCollection |
||
88 | */ |
||
89 | public function getSlots(): Collection |
||
90 | { |
||
91 | return $this->slots; |
||
92 | } |
||
93 | |||
94 | /** |
||
95 | * @return ProductInterface |
||
96 | */ |
||
97 | public function getProduct(): ProductInterface |
||
101 | |||
102 | /** |
||
103 | * @param ProductInterface $product |
||
104 | */ |
||
105 | public function setProduct(ProductInterface $product): void |
||
109 | } |
||
110 |