1 | <?php |
||
24 | class ProductOption implements ProductOptionInterface |
||
|
|||
25 | { |
||
26 | use TimestampableTrait; |
||
27 | use TranslatableTrait { |
||
28 | __construct as private initializeTranslationsCollection; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @var mixed |
||
33 | */ |
||
34 | protected $id; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $code; |
||
40 | |||
41 | /** |
||
42 | * @var Collection|ProductOptionValueInterface[] |
||
43 | */ |
||
44 | protected $values; |
||
45 | |||
46 | public function __construct() |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function __toString() |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function getId() |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function getCode() |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function setCode($code) |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | public function getName() |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function setName($name) |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | public function getValues() |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | public function addValue(ProductOptionValueInterface $value) |
||
120 | |||
121 | /** |
||
122 | * {@inheritdoc} |
||
123 | */ |
||
124 | public function removeValue(ProductOptionValueInterface $value) |
||
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | */ |
||
135 | public function hasValue(ProductOptionValueInterface $value) |
||
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | protected function createTranslation() |
||
147 | } |
||
148 |