1 | <?php |
||
27 | class Product extends BaseProduct implements ProductInterface, ReviewableProductInterface |
||
28 | { |
||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $variantSelectionMethod = self::VARIANT_SELECTION_CHOICE; |
||
|
|||
33 | |||
34 | /** |
||
35 | * @var Collection|ProductTaxonInterface[] |
||
36 | */ |
||
37 | protected $productTaxons; |
||
38 | |||
39 | /** |
||
40 | * @var Collection|ChannelInterface[] |
||
41 | */ |
||
42 | protected $channels; |
||
43 | |||
44 | /** |
||
45 | * @var BaseTaxonInterface |
||
46 | */ |
||
47 | protected $mainTaxon; |
||
48 | |||
49 | /** |
||
50 | * @var Collection|ReviewInterface[] |
||
51 | */ |
||
52 | protected $reviews; |
||
53 | |||
54 | /** |
||
55 | * @var float |
||
56 | */ |
||
57 | protected $averageRating = 0; |
||
58 | |||
59 | /** |
||
60 | * @var Collection|ImageInterface[] |
||
61 | */ |
||
62 | protected $images; |
||
63 | |||
64 | public function __construct() |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function getVariantSelectionMethod() |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function setVariantSelectionMethod($variantSelectionMethod) |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function isVariantSelectionMethodChoice() |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | public function getVariantSelectionMethodLabel() |
||
111 | |||
112 | /** |
||
113 | * {@inheritdoc} |
||
114 | */ |
||
115 | public function getProductTaxons() |
||
119 | |||
120 | /** |
||
121 | * {@inheritdoc} |
||
122 | */ |
||
123 | public function addProductTaxon(ProductTaxonInterface $productTaxon) |
||
130 | |||
131 | /** |
||
132 | * {@inheritdoc} |
||
133 | */ |
||
134 | public function removeProductTaxon(ProductTaxonInterface $productTaxon) |
||
140 | |||
141 | /** |
||
142 | * {@inheritdoc} |
||
143 | */ |
||
144 | public function hasProductTaxon(ProductTaxonInterface $productTaxon) |
||
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | public function filterProductTaxonsByTaxon(TaxonInterface $taxon) |
||
158 | |||
159 | /** |
||
160 | * {@inheritdoc} |
||
161 | */ |
||
162 | public function getChannels() |
||
166 | |||
167 | /** |
||
168 | * {@inheritdoc} |
||
169 | */ |
||
170 | public function addChannel(BaseChannelInterface $channel) |
||
176 | |||
177 | /** |
||
178 | * {@inheritdoc} |
||
179 | */ |
||
180 | public function removeChannel(BaseChannelInterface $channel) |
||
186 | |||
187 | /** |
||
188 | * {@inheritdoc} |
||
189 | */ |
||
190 | public function hasChannel(BaseChannelInterface $channel) |
||
194 | |||
195 | /** |
||
196 | * {@inheritdoc} |
||
197 | */ |
||
198 | public static function getVariantSelectionMethodLabels() |
||
205 | |||
206 | /** |
||
207 | * {@inheritdoc} |
||
208 | */ |
||
209 | public function getShortDescription() |
||
213 | |||
214 | /** |
||
215 | * {@inheritdoc} |
||
216 | */ |
||
217 | public function setShortDescription($shortDescription) |
||
221 | |||
222 | /** |
||
223 | * {@inheritdoc} |
||
224 | */ |
||
225 | public function getMainTaxon() |
||
229 | |||
230 | /** |
||
231 | * {@inheritdoc} |
||
232 | */ |
||
233 | public function setMainTaxon(TaxonInterface $mainTaxon = null) |
||
237 | |||
238 | /** |
||
239 | * {@inheritdoc} |
||
240 | */ |
||
241 | public function getReviews() |
||
245 | |||
246 | /** |
||
247 | * {@inheritdoc} |
||
248 | */ |
||
249 | public function getAcceptedReviews() |
||
257 | |||
258 | /** |
||
259 | * {@inheritdoc} |
||
260 | */ |
||
261 | public function addReview(ReviewInterface $review) |
||
265 | |||
266 | /** |
||
267 | * {@inheritdoc} |
||
268 | */ |
||
269 | public function removeReview(ReviewInterface $review) |
||
273 | |||
274 | /** |
||
275 | * {@inheritdoc} |
||
276 | */ |
||
277 | public function getAverageRating() |
||
281 | |||
282 | /** |
||
283 | * {@inheritdoc} |
||
284 | */ |
||
285 | public function setAverageRating($averageRating) |
||
289 | |||
290 | /** |
||
291 | * {@inheritdoc} |
||
292 | */ |
||
293 | public function getImages() |
||
297 | |||
298 | /** |
||
299 | * {@inheritdoc} |
||
300 | */ |
||
301 | public function getImagesByType($type) |
||
307 | |||
308 | /** |
||
309 | * {@inheritdoc} |
||
310 | */ |
||
311 | public function hasImages() |
||
315 | |||
316 | /** |
||
317 | * {@inheritdoc} |
||
318 | */ |
||
319 | public function hasImage(ImageInterface $image) |
||
323 | |||
324 | /** |
||
325 | * {@inheritdoc} |
||
326 | */ |
||
327 | public function addImage(ImageInterface $image) |
||
332 | |||
333 | /** |
||
334 | * {@inheritdoc} |
||
335 | */ |
||
336 | public function removeImage(ImageInterface $image) |
||
343 | |||
344 | /** |
||
345 | * {@inheritdoc} |
||
346 | */ |
||
347 | protected function createTranslation() |
||
351 | } |
||
352 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.