Completed
Push — master ( dca996...97527d )
by Joachim
12:46 queued 11s
created

Product::getChildren()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Loevgaard\DandomainFoundation\Entity;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
use Doctrine\ORM\Mapping as ORM;
7
use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletable;
8
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
9
use Knp\DoctrineBehaviors\Model\Translatable\Translatable;
10
use Loevgaard\DandomainFoundation\Entity\Generated\CategoryInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...rated\CategoryInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use Loevgaard\DandomainFoundation\Entity\Generated\ManufacturerInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...d\ManufacturerInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use Loevgaard\DandomainFoundation\Entity\Generated\MediumInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...nerated\MediumInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
use Loevgaard\DandomainFoundation\Entity\Generated\PriceInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...enerated\PriceInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
use Loevgaard\DandomainFoundation\Entity\Generated\ProductInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...erated\ProductInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
use Loevgaard\DandomainFoundation\Entity\Generated\ProductRelationInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...roductRelationInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
use Loevgaard\DandomainFoundation\Entity\Generated\ProductTrait;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...\Generated\ProductTrait was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
use Loevgaard\DandomainFoundation\Entity\Generated\ProductTranslationInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...uctTranslationInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
use Loevgaard\DandomainFoundation\Entity\Generated\ProductTypeInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...ed\ProductTypeInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
use Loevgaard\DandomainFoundation\Entity\Generated\SegmentInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...erated\SegmentInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
20
use Loevgaard\DandomainFoundation\Entity\Generated\VariantGroupInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...d\VariantGroupInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
21
use Loevgaard\DandomainFoundation\Entity\Generated\VariantInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...erated\VariantInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
22
23
/**
24
 * @ORM\Entity()
25
 * @ORM\Table(name="ldf_products")
26
 * @method ProductTranslationInterface translate(string $locale = null, bool $fallbackToDefault = true)
27
 */
28
class Product extends AbstractEntity implements ProductInterface
29
{
30
    use ProductTrait;
31
    use Timestampable;
32
    use SoftDeletable;
33
    use Translatable;
34
35
    protected $hydrateConversions = [
36
        'id' => 'externalId'
37
    ];
38
39
    /**
40
     * @var int
41
     *
42
     * @ORM\Id
43
     * @ORM\GeneratedValue
44
     * @ORM\Column(type="integer")
45
     **/
46
    protected $id;
47
48
    /**
49
     * @var int
50
     *
51
     * @ORM\Column(type="integer", unique=true)
52
     */
53
    protected $externalId;
54
55
    /**
56
     * @var string|null
57
     *
58
     * @ORM\Column(nullable=true, type="string", length=191)
59
     */
60
    protected $barCodeNumber;
61
62
    /**
63
     * @var array|null
64
     *
65
     * @ORM\Column(nullable=true, type="json")
66
     */
67
    protected $categoryIdList;
68
69
    /**
70
     * @var string|null
71
     *
72
     * @ORM\Column(nullable=true, type="string", length=191)
73
     */
74
    protected $comments;
75
76
    /**
77
     * @var float|null
78
     *
79
     * @ORM\Column(nullable=true, type="decimal", precision=12, scale=2)
80
     */
81
    protected $costPrice;
82
83
    /**
84
     * @var \DateTimeImmutable|null
85
     *
86
     * @ORM\Column(nullable=true, type="datetime_immutable", options={"comment"="Created info from Dandomain"})
87
     */
88
    protected $created;
89
90
    /**
91
     * @var string|null
92
     *
93
     * @ORM\Column(nullable=true, type="string", length=191, options={"comment"="Created by info from Dandomain"})
94
     */
95
    protected $createdBy;
96
97
    /**
98
     * @var int|null
99
     *
100
     * @ORM\Column(nullable=true, type="integer")
101
     */
102
    protected $defaultCategoryId;
103
104
    /**
105
     * @var array|null
106
     *
107
     * @ORM\Column(nullable=true, type="json")
108
     */
109
    protected $disabledVariantIdList;
110
111
    /**
112
     * @var string|null
113
     *
114
     * @ORM\Column(nullable=true, type="string", length=191)
115
     */
116
    protected $edbPriserProductNumber;
117
118
    /**
119
     * @var string|null
120
     *
121
     * @ORM\Column(nullable=true, type="string", length=191)
122
     */
123
    protected $fileSaleLink;
124
125
    /**
126
     * @var string|null
127
     *
128
     * @ORM\Column(nullable=true, type="string", length=191)
129
     */
130
    protected $googleFeedCategory;
131
132
    /**
133
     * @var bool|null
134
     *
135
     * @ORM\Column(nullable=true, type="boolean")
136
     */
137
    protected $isGiftCertificate;
138
139
    /**
140
     * @var bool|null
141
     *
142
     * @ORM\Column(nullable=true, type="boolean")
143
     */
144
    protected $isModified;
145
146
    /**
147
     * @var bool|null
148
     *
149
     * @ORM\Column(nullable=true, type="boolean")
150
     */
151
    protected $isRateVariants;
152
153
    /**
154
     * @var bool|null
155
     *
156
     * @ORM\Column(nullable=true, type="boolean")
157
     */
158
    protected $isReviewVariants;
159
160
    /**
161
     * @var bool|null
162
     *
163
     * @ORM\Column(nullable=true, type="boolean")
164
     */
165
    protected $isVariantMaster;
166
167
    /**
168
     * @var string|null
169
     *
170
     * @ORM\Column(nullable=true, type="string", length=191)
171
     */
172
    protected $locationNumber;
173
174
    /**
175
     * @var array|null
176
     *
177
     * @ORM\Column(nullable=true, type="json")
178
     */
179
    protected $manufacturereIdList;
180
181
    /**
182
     * @var int|null
183
     *
184
     * @ORM\Column(nullable=true, type="integer")
185
     */
186
    protected $maxBuyAmount;
187
188
    /**
189
     * @var int|null
190
     *
191
     * @ORM\Column(nullable=true, type="integer")
192
     */
193
    protected $minBuyAmount;
194
195
    /**
196
     * @var int|null
197
     *
198
     * @ORM\Column(nullable=true, type="integer")
199
     */
200
    protected $minBuyAmountB2B;
201
202
    /**
203
     * The product number
204
     *
205
     * @var string|null
206
     *
207
     * @ORM\Column(nullable=true, type="string", length=191)
208
     */
209
    protected $number;
210
211
    /**
212
     * @var string|null
213
     *
214
     * @ORM\Column(nullable=true, type="string", length=191)
215
     */
216
    protected $picture;
217
218
    /**
219
     * @var int|null
220
     *
221
     * @ORM\Column(nullable=true, type="integer")
222
     */
223
    protected $salesCount;
224
225
    /**
226
     * @var array|null
227
     *
228
     * @ORM\Column(nullable=true, type="json")
229
     */
230
    protected $segmentIdList;
231
232
    /**
233
     * @var int|null
234
     *
235
     * @ORM\Column(nullable=true, type="integer")
236
     */
237
    protected $sortOrder;
238
239
    /**
240
     * @var int|null
241
     *
242
     * @ORM\Column(nullable=true, type="integer")
243
     */
244
    protected $stockCount;
245
246
    /**
247
     * @var int|null
248
     *
249
     * @ORM\Column(nullable=true, type="integer")
250
     */
251
    protected $stockLimit;
252
253
    /**
254
     * @var int|null
255
     *
256
     * @ORM\Column(nullable=true, type="integer")
257
     */
258
    protected $typeId;
259
260
    /**
261
     * @var \DateTimeImmutable|null
262
     *
263
     * @ORM\Column(nullable=true, type="datetime_immutable", options={"comment"="Updated info from Dandomain"})
264
     */
265
    protected $updated;
266
267
    /**
268
     * @var string|null
269
     *
270
     * @ORM\Column(nullable=true, type="string", length=191, options={"comment"="Updated by info from Dandomain"})
271
     */
272
    protected $updatedBy;
273
274
    /**
275
     * @var array|null
276
     *
277
     * @ORM\Column(nullable=true, type="json")
278
     */
279
    protected $variantGroupIdList;
280
281
    /**
282
     * @var array|null
283
     *
284
     * @ORM\Column(nullable=true, type="json")
285
     */
286
    protected $variantIdList;
287
288
    /**
289
     * @var int|null
290
     *
291
     * @ORM\Column(nullable=true, type="string", length=191)
292
     */
293
    protected $variantMasterId;
294
295
    /**
296
     * @var string|null
297
     *
298
     * @ORM\Column(nullable=true, type="string", length=191)
299
     */
300
    protected $vendorNumber;
301
302
    /**
303
     * @var int|null
304
     *
305
     * @ORM\Column(nullable=true, type="integer")
306
     */
307
    protected $weight;
308
309
    /**
310
     * @var Category[]|ArrayCollection
311
     */
312
    protected $categories;
313
314
    /**
315
     * @var Variant[]|ArrayCollection
316
     */
317
    protected $disabledVariants;
318
319
    /**
320
     * @var Manufacturer[]|ArrayCollection
321
     *
322
     * @ORM\JoinTable(name="ldf_product_manufacturer")
323
     * @ORM\ManyToMany(cascade={"persist"}, inversedBy="products", targetEntity="Manufacturer")
324
     */
325
    protected $manufacturers;
326
327
    /**
328
     * @var Medium[]|ArrayCollection
329
     */
330
    protected $media;
331
332
    /**
333
     * @var Price[]|ArrayCollection
334
     */
335
    protected $prices;
336
337
    /**
338
     * @var ProductRelation[]|ArrayCollection
339
     */
340
    protected $productRelations;
341
342
    /**
343
     * @var ProductType
344
     */
345
    protected $productType;
346
347
    /**
348
     * @var Segment[]|ArrayCollection
349
     */
350
    protected $segments;
351
352
    /**
353
     * @var VariantGroup[]|ArrayCollection
354
     *
355
     * @ORM\JoinTable(name="ldf_product_variant_group")
356
     * @ORM\ManyToMany(cascade={"persist"}, inversedBy="products", targetEntity="VariantGroup")
357
     */
358
    protected $variantGroups;
359
360
    /**
361
     * @var Variant[]|ArrayCollection
362
     */
363
    protected $variants;
364
365
    /**
366
     * This is the master for this product
367
     *
368
     * @var Product|null
369
     *
370
     * @ORM\ManyToOne(targetEntity="Product", inversedBy="children")
371
     */
372
    protected $parent;
373
374
    /**
375
     * This is the children (i.e. variants) of this products
376
     *
377
     * @var Product[]|ArrayCollection
378
     *
379
     * @ORM\OneToMany(targetEntity="Product", mappedBy="parent")
380
     */
381
    protected $children;
382
383
    public function __construct()
384
    {
385
        $this->categories = new ArrayCollection();
386
        $this->disabledVariants = new ArrayCollection();
387
        $this->manufacturers = new ArrayCollection();
388
        $this->media = new ArrayCollection();
389
        $this->prices = new ArrayCollection();
390
        $this->productRelations = new ArrayCollection();
391
        $this->segments = new ArrayCollection();
392
        $this->variants = new ArrayCollection();
393
        $this->variantGroups = new ArrayCollection();
394
        $this->children = new ArrayCollection();
395
    }
396
397
    public function hydrate(array $data, bool $useConversions = false, $scalarsOnly = true)
398
    {
399
        if (isset($data['created'])) {
400
            $data['created'] = $this->getDateTimeFromJson($data['created']);
401
        }
402
403
        if (isset($data['updated'])) {
404
            $data['updated'] = $this->getDateTimeFromJson($data['updated']);
405
        }
406
407
        parent::hydrate($data, $useConversions, $scalarsOnly);
408
    }
409
410
    /*
411
     * Collection/relation methods
412
     */
413
414
    public function addDisabledVariant(VariantInterface $variant) : ProductInterface
415
    {
416
        if (!$this->disabledVariants->contains($variant)) {
417
            $this->disabledVariants->add($variant);
418
        }
419
420
        return $this;
421
    }
422
423
    public function addMedium(MediumInterface $medium) : ProductInterface
424
    {
425
        if (!$this->media->contains($medium)) {
426
            $this->media->add($medium);
427
        }
428
429
        return $this;
430
    }
431
432
    public function addCategory(CategoryInterface $category) : ProductInterface
433
    {
434
        if (!$this->categories->contains($category)) {
435
            $this->categories->add($category);
436
        }
437
438
        return $this;
439
    }
440
441
    public function addManufacturer(ManufacturerInterface $manufacturer) : ProductInterface
442
    {
443
        if (!$this->hasManufacturer($manufacturer)) {
444
            $this->manufacturers->add($manufacturer);
445
        }
446
447
        return $this;
448
    }
449
450
    public function removeManufacturer(ManufacturerInterface $manufacturer) : bool
451
    {
452
        return $this->manufacturers->removeElement($manufacturer);
453
    }
454
455
    public function hasManufacturer(ManufacturerInterface $manufacturer) : bool
456
    {
457
        return $this->manufacturers->exists(function ($key, ManufacturerInterface $element) use ($manufacturer) {
458
            return $element->getExternalId() === $manufacturer->getExternalId();
459
        });
460
    }
461
462
    public function addVariantGroup(VariantGroupInterface $variantGroup) : ProductInterface
463
    {
464
        if (!$this->hasVariantGroup($variantGroup)) {
465
            $this->variantGroups->add($variantGroup);
466
        }
467
468
        return $this;
469
    }
470
471
    public function removeVariantGroup(VariantGroupInterface $variantGroup) : bool
472
    {
473
        return $this->variantGroups->removeElement($variantGroup);
474
    }
475
476
    public function hasVariantGroup($variantGroup) : bool
477
    {
478
        if ($variantGroup instanceof VariantGroupInterface) {
479
            $variantGroup = $variantGroup->getExternalId();
480
        }
481
482
        return $this->variantGroups->exists(function ($key, VariantGroupInterface $element) use ($variantGroup) {
483
            return $element->getExternalId() === $variantGroup;
484
        });
485
    }
486
487
    public function addPrice(PriceInterface $price) : ProductInterface
488
    {
489
        if (!$this->prices->contains($price)) {
490
            $this->prices->add($price);
491
        }
492
493
        return $this;
494
    }
495
496
    public function addProductRelation(ProductRelationInterface $productRelation) : ProductInterface
497
    {
498
        if (!$this->productRelations->contains($productRelation)) {
499
            $this->productRelations->add($productRelation);
500
        }
501
502
        return $this;
503
    }
504
505
    public function addSegment(SegmentInterface $segment) : ProductInterface
506
    {
507
        if (!$this->segments->contains($segment)) {
508
            $this->segments->add($segment);
509
        }
510
511
        return $this;
512
    }
513
514
    public function addVariant(VariantInterface $variant) : ProductInterface
515
    {
516
        if (!$this->variants->contains($variant)) {
517
            $this->variants->add($variant);
518
        }
519
520
        return $this;
521
    }
522
523
    /*
524
     * Getters / Setters
525
     */
526
    /**
527
     * @return int
528
     */
529
    public function getId(): int
530
    {
531
        return (int)$this->id;
532
    }
533
534
    /**
535
     * @param int $id
536
     * @return ProductInterface
537
     */
538
    public function setId(int $id)
539
    {
540
        $this->id = $id;
541
        return $this;
542
    }
543
544
    /**
545
     * @return int
546
     */
547
    public function getExternalId(): int
548
    {
549
        return (int)$this->externalId;
550
    }
551
552
    /**
553
     * @param int $externalId
554
     * @return ProductInterface
555
     */
556
    public function setExternalId(int $externalId)
557
    {
558
        $this->externalId = $externalId;
559
        return $this;
560
    }
561
562
    /**
563
     * @return null|string
564
     */
565
    public function getBarCodeNumber()
566
    {
567
        return $this->barCodeNumber;
568
    }
569
570
    /**
571
     * @param null|string $barCodeNumber
572
     * @return ProductInterface
573
     */
574
    public function setBarCodeNumber($barCodeNumber)
575
    {
576
        $this->barCodeNumber = $barCodeNumber;
577
        return $this;
578
    }
579
580
    /**
581
     * @return array|null
582
     */
583
    public function getCategoryIdList()
584
    {
585
        return $this->categoryIdList;
586
    }
587
588
    /**
589
     * @param array|null $categoryIdList
590
     * @return ProductInterface
591
     */
592
    public function setCategoryIdList($categoryIdList)
593
    {
594
        $this->categoryIdList = $categoryIdList;
595
        return $this;
596
    }
597
598
    /**
599
     * @return null|string
600
     */
601
    public function getComments()
602
    {
603
        return $this->comments;
604
    }
605
606
    /**
607
     * @param null|string $comments
608
     * @return ProductInterface
609
     */
610
    public function setComments($comments)
611
    {
612
        $this->comments = $comments;
613
        return $this;
614
    }
615
616
    /**
617
     * @return float|null
618
     */
619
    public function getCostPrice()
620
    {
621
        return $this->costPrice;
622
    }
623
624
    /**
625
     * @param float|null $costPrice
626
     * @return ProductInterface
627
     */
628
    public function setCostPrice($costPrice)
629
    {
630
        $this->costPrice = $costPrice;
631
        return $this;
632
    }
633
634
    /**
635
     * @return \DateTimeImmutable|null
636
     */
637
    public function getCreated()
638
    {
639
        return $this->created;
640
    }
641
642
    /**
643
     * @param \DateTimeImmutable|null $created
644
     * @return ProductInterface
645
     */
646
    public function setCreated($created)
647
    {
648
        $this->created = $created;
649
        return $this;
650
    }
651
652
    /**
653
     * @return null|string
654
     */
655
    public function getCreatedBy()
656
    {
657
        return $this->createdBy;
658
    }
659
660
    /**
661
     * @param null|string $createdBy
662
     * @return ProductInterface
663
     */
664
    public function setCreatedBy($createdBy)
665
    {
666
        $this->createdBy = $createdBy;
667
        return $this;
668
    }
669
670
    /**
671
     * @return int|null
672
     */
673
    public function getDefaultCategoryId()
674
    {
675
        return $this->defaultCategoryId;
676
    }
677
678
    /**
679
     * @param int|null $defaultCategoryId
680
     * @return ProductInterface
681
     */
682
    public function setDefaultCategoryId($defaultCategoryId)
683
    {
684
        $this->defaultCategoryId = $defaultCategoryId;
685
        return $this;
686
    }
687
688
    /**
689
     * @return array|null
690
     */
691
    public function getDisabledVariantIdList()
692
    {
693
        return $this->disabledVariantIdList;
694
    }
695
696
    /**
697
     * @param array|null $disabledVariantIdList
698
     * @return ProductInterface
699
     */
700
    public function setDisabledVariantIdList($disabledVariantIdList)
701
    {
702
        $this->disabledVariantIdList = $disabledVariantIdList;
703
        return $this;
704
    }
705
706
    /**
707
     * @return null|string
708
     */
709
    public function getEdbPriserProductNumber()
710
    {
711
        return $this->edbPriserProductNumber;
712
    }
713
714
    /**
715
     * @param null|string $edbPriserProductNumber
716
     * @return ProductInterface
717
     */
718
    public function setEdbPriserProductNumber($edbPriserProductNumber)
719
    {
720
        $this->edbPriserProductNumber = $edbPriserProductNumber;
721
        return $this;
722
    }
723
724
    /**
725
     * @return null|string
726
     */
727
    public function getFileSaleLink()
728
    {
729
        return $this->fileSaleLink;
730
    }
731
732
    /**
733
     * @param null|string $fileSaleLink
734
     * @return ProductInterface
735
     */
736
    public function setFileSaleLink($fileSaleLink)
737
    {
738
        $this->fileSaleLink = $fileSaleLink;
739
        return $this;
740
    }
741
742
    /**
743
     * @return null|string
744
     */
745
    public function getGoogleFeedCategory()
746
    {
747
        return $this->googleFeedCategory;
748
    }
749
750
    /**
751
     * @param null|string $googleFeedCategory
752
     * @return ProductInterface
753
     */
754
    public function setGoogleFeedCategory($googleFeedCategory)
755
    {
756
        $this->googleFeedCategory = $googleFeedCategory;
757
        return $this;
758
    }
759
760
    /**
761
     * @return bool|null
762
     */
763
    public function getIsGiftCertificate()
764
    {
765
        return $this->isGiftCertificate;
766
    }
767
768
    /**
769
     * @param bool|null $isGiftCertificate
770
     * @return ProductInterface
771
     */
772
    public function setIsGiftCertificate($isGiftCertificate)
773
    {
774
        $this->isGiftCertificate = $isGiftCertificate;
775
        return $this;
776
    }
777
778
    /**
779
     * @return bool|null
780
     */
781
    public function getIsModified()
782
    {
783
        return $this->isModified;
784
    }
785
786
    /**
787
     * @param bool|null $isModified
788
     * @return ProductInterface
789
     */
790
    public function setIsModified($isModified)
791
    {
792
        $this->isModified = $isModified;
793
        return $this;
794
    }
795
796
    /**
797
     * @return bool|null
798
     */
799
    public function getIsRateVariants()
800
    {
801
        return $this->isRateVariants;
802
    }
803
804
    /**
805
     * @param bool|null $isRateVariants
806
     * @return ProductInterface
807
     */
808
    public function setIsRateVariants($isRateVariants)
809
    {
810
        $this->isRateVariants = $isRateVariants;
811
        return $this;
812
    }
813
814
    /**
815
     * @return bool|null
816
     */
817
    public function getIsReviewVariants()
818
    {
819
        return $this->isReviewVariants;
820
    }
821
822
    /**
823
     * @param bool|null $isReviewVariants
824
     * @return ProductInterface
825
     */
826
    public function setIsReviewVariants($isReviewVariants)
827
    {
828
        $this->isReviewVariants = $isReviewVariants;
829
        return $this;
830
    }
831
832
    /**
833
     * @return bool|null
834
     */
835
    public function getIsVariantMaster()
836
    {
837
        return $this->isVariantMaster;
838
    }
839
840
    /**
841
     * @param bool|null $isVariantMaster
842
     * @return ProductInterface
843
     */
844
    public function setIsVariantMaster($isVariantMaster)
845
    {
846
        $this->isVariantMaster = $isVariantMaster;
847
        return $this;
848
    }
849
850
    /**
851
     * @return null|string
852
     */
853
    public function getLocationNumber()
854
    {
855
        return $this->locationNumber;
856
    }
857
858
    /**
859
     * @param null|string $locationNumber
860
     * @return ProductInterface
861
     */
862
    public function setLocationNumber($locationNumber)
863
    {
864
        $this->locationNumber = $locationNumber;
865
        return $this;
866
    }
867
868
    /**
869
     * @return array|null
870
     */
871
    public function getManufacturereIdList()
872
    {
873
        return $this->manufacturereIdList;
874
    }
875
876
    /**
877
     * @param array|null $manufacturereIdList
878
     * @return ProductInterface
879
     */
880
    public function setManufacturereIdList($manufacturereIdList)
881
    {
882
        $this->manufacturereIdList = $manufacturereIdList;
883
        return $this;
884
    }
885
886
    /**
887
     * @return int|null
888
     */
889
    public function getMaxBuyAmount()
890
    {
891
        return $this->maxBuyAmount;
892
    }
893
894
    /**
895
     * @param int|null $maxBuyAmount
896
     * @return ProductInterface
897
     */
898
    public function setMaxBuyAmount($maxBuyAmount)
899
    {
900
        $this->maxBuyAmount = $maxBuyAmount;
901
        return $this;
902
    }
903
904
    /**
905
     * @return int|null
906
     */
907
    public function getMinBuyAmount()
908
    {
909
        return $this->minBuyAmount;
910
    }
911
912
    /**
913
     * @param int|null $minBuyAmount
914
     * @return ProductInterface
915
     */
916
    public function setMinBuyAmount($minBuyAmount)
917
    {
918
        $this->minBuyAmount = $minBuyAmount;
919
        return $this;
920
    }
921
922
    /**
923
     * @return int|null
924
     */
925
    public function getMinBuyAmountB2B()
926
    {
927
        return $this->minBuyAmountB2B;
928
    }
929
930
    /**
931
     * @param int|null $minBuyAmountB2B
932
     * @return ProductInterface
933
     */
934
    public function setMinBuyAmountB2B($minBuyAmountB2B)
935
    {
936
        $this->minBuyAmountB2B = $minBuyAmountB2B;
937
        return $this;
938
    }
939
940
    /**
941
     * @return null|string
942
     */
943
    public function getNumber()
944
    {
945
        return $this->number;
946
    }
947
948
    /**
949
     * @param null|string $number
950
     * @return ProductInterface
951
     */
952
    public function setNumber($number)
953
    {
954
        $this->number = $number;
955
        return $this;
956
    }
957
958
    /**
959
     * @return null|string
960
     */
961
    public function getPicture()
962
    {
963
        return $this->picture;
964
    }
965
966
    /**
967
     * @param null|string $picture
968
     * @return ProductInterface
969
     */
970
    public function setPicture($picture)
971
    {
972
        $this->picture = $picture;
973
        return $this;
974
    }
975
976
    /**
977
     * @return int|null
978
     */
979
    public function getSalesCount()
980
    {
981
        return $this->salesCount;
982
    }
983
984
    /**
985
     * @param int|null $salesCount
986
     * @return ProductInterface
987
     */
988
    public function setSalesCount($salesCount)
989
    {
990
        $this->salesCount = $salesCount;
991
        return $this;
992
    }
993
994
    /**
995
     * @return array|null
996
     */
997
    public function getSegmentIdList()
998
    {
999
        return $this->segmentIdList;
1000
    }
1001
1002
    /**
1003
     * @param array|null $segmentIdList
1004
     * @return ProductInterface
1005
     */
1006
    public function setSegmentIdList($segmentIdList)
1007
    {
1008
        $this->segmentIdList = $segmentIdList;
1009
        return $this;
1010
    }
1011
1012
    /**
1013
     * @return int|null
1014
     */
1015
    public function getSortOrder()
1016
    {
1017
        return $this->sortOrder;
1018
    }
1019
1020
    /**
1021
     * @param int|null $sortOrder
1022
     * @return ProductInterface
1023
     */
1024
    public function setSortOrder($sortOrder)
1025
    {
1026
        $this->sortOrder = $sortOrder;
1027
        return $this;
1028
    }
1029
1030
    /**
1031
     * @return int|null
1032
     */
1033
    public function getStockCount()
1034
    {
1035
        return $this->stockCount;
1036
    }
1037
1038
    /**
1039
     * @param int|null $stockCount
1040
     * @return ProductInterface
1041
     */
1042
    public function setStockCount($stockCount)
1043
    {
1044
        $this->stockCount = $stockCount;
1045
        return $this;
1046
    }
1047
1048
    /**
1049
     * @return int|null
1050
     */
1051
    public function getStockLimit()
1052
    {
1053
        return $this->stockLimit;
1054
    }
1055
1056
    /**
1057
     * @param int|null $stockLimit
1058
     * @return ProductInterface
1059
     */
1060
    public function setStockLimit($stockLimit)
1061
    {
1062
        $this->stockLimit = $stockLimit;
1063
        return $this;
1064
    }
1065
1066
    /**
1067
     * @return int|null
1068
     */
1069
    public function getTypeId()
1070
    {
1071
        return $this->typeId;
1072
    }
1073
1074
    /**
1075
     * @param int|null $typeId
1076
     * @return ProductInterface
1077
     */
1078
    public function setTypeId($typeId)
1079
    {
1080
        $this->typeId = $typeId;
1081
        return $this;
1082
    }
1083
1084
    /**
1085
     * @return \DateTimeImmutable|null
1086
     */
1087
    public function getUpdated()
1088
    {
1089
        return $this->updated;
1090
    }
1091
1092
    /**
1093
     * @param \DateTimeImmutable|null $updated
1094
     * @return ProductInterface
1095
     */
1096
    public function setUpdated($updated)
1097
    {
1098
        $this->updated = $updated;
1099
        return $this;
1100
    }
1101
1102
    /**
1103
     * @return null|string
1104
     */
1105
    public function getUpdatedBy()
1106
    {
1107
        return $this->updatedBy;
1108
    }
1109
1110
    /**
1111
     * @param null|string $updatedBy
1112
     * @return ProductInterface
1113
     */
1114
    public function setUpdatedBy($updatedBy)
1115
    {
1116
        $this->updatedBy = $updatedBy;
1117
        return $this;
1118
    }
1119
1120
    /**
1121
     * @return array|null
1122
     */
1123
    public function getVariantGroupIdList()
1124
    {
1125
        return $this->variantGroupIdList;
1126
    }
1127
1128
    /**
1129
     * @param array|null $variantGroupIdList
1130
     * @return ProductInterface
1131
     */
1132
    public function setVariantGroupIdList($variantGroupIdList)
1133
    {
1134
        $this->variantGroupIdList = $variantGroupIdList;
1135
        return $this;
1136
    }
1137
1138
    /**
1139
     * @return array|null
1140
     */
1141
    public function getVariantIdList()
1142
    {
1143
        return $this->variantIdList;
1144
    }
1145
1146
    /**
1147
     * @param array|null $variantIdList
1148
     * @return ProductInterface
1149
     */
1150
    public function setVariantIdList($variantIdList)
1151
    {
1152
        $this->variantIdList = $variantIdList;
1153
        return $this;
1154
    }
1155
1156
    /**
1157
     * @return int|null
1158
     */
1159
    public function getVariantMasterId()
1160
    {
1161
        return $this->variantMasterId;
1162
    }
1163
1164
    /**
1165
     * @param int|null $variantMasterId
1166
     * @return ProductInterface
1167
     */
1168
    public function setVariantMasterId($variantMasterId)
1169
    {
1170
        $this->variantMasterId = $variantMasterId;
1171
        return $this;
1172
    }
1173
1174
    /**
1175
     * @return null|string
1176
     */
1177
    public function getVendorNumber()
1178
    {
1179
        return $this->vendorNumber;
1180
    }
1181
1182
    /**
1183
     * @param null|string $vendorNumber
1184
     * @return ProductInterface
1185
     */
1186
    public function setVendorNumber($vendorNumber)
1187
    {
1188
        $this->vendorNumber = $vendorNumber;
1189
        return $this;
1190
    }
1191
1192
    /**
1193
     * @return int|null
1194
     */
1195
    public function getWeight()
1196
    {
1197
        return $this->weight;
1198
    }
1199
1200
    /**
1201
     * @param int|null $weight
1202
     * @return ProductInterface
1203
     */
1204
    public function setWeight($weight)
1205
    {
1206
        $this->weight = $weight;
1207
        return $this;
1208
    }
1209
1210
    /**
1211
     * @return ArrayCollection|Category[]
1212
     */
1213
    public function getCategories()
1214
    {
1215
        return $this->categories;
1216
    }
1217
1218
    /**
1219
     * @param ArrayCollection|Category[] $categories
1220
     * @return ProductInterface
1221
     */
1222
    public function setCategories($categories)
1223
    {
1224
        $this->categories = $categories;
1225
        return $this;
1226
    }
1227
1228
    /**
1229
     * @return ArrayCollection|Variant[]
1230
     */
1231
    public function getDisabledVariants()
1232
    {
1233
        return $this->disabledVariants;
1234
    }
1235
1236
    /**
1237
     * @param ArrayCollection|Variant[] $disabledVariants
1238
     * @return ProductInterface
1239
     */
1240
    public function setDisabledVariants($disabledVariants)
1241
    {
1242
        $this->disabledVariants = $disabledVariants;
1243
        return $this;
1244
    }
1245
1246
    /**
1247
     * @return ArrayCollection|Manufacturer[]
1248
     */
1249
    public function getManufacturers()
1250
    {
1251
        return $this->manufacturers;
1252
    }
1253
1254
    /**
1255
     * @param ArrayCollection|Manufacturer[] $manufacturers
1256
     * @return ProductInterface
1257
     */
1258
    public function setManufacturers($manufacturers)
1259
    {
1260
        $this->manufacturers = $manufacturers;
1261
        return $this;
1262
    }
1263
1264
    /**
1265
     * @return ArrayCollection|Medium[]
1266
     */
1267
    public function getMedia()
1268
    {
1269
        return $this->media;
1270
    }
1271
1272
    /**
1273
     * @param ArrayCollection|Medium[] $media
1274
     * @return ProductInterface
1275
     */
1276
    public function setMedia($media)
1277
    {
1278
        $this->media = $media;
1279
        return $this;
1280
    }
1281
1282
    /**
1283
     * @return ArrayCollection|Price[]
1284
     */
1285
    public function getPrices()
1286
    {
1287
        return $this->prices;
1288
    }
1289
1290
    /**
1291
     * @param ArrayCollection|Price[] $prices
1292
     * @return ProductInterface
1293
     */
1294
    public function setPrices($prices)
1295
    {
1296
        $this->prices = $prices;
1297
        return $this;
1298
    }
1299
1300
    /**
1301
     * @return ArrayCollection|ProductRelation[]
1302
     */
1303
    public function getProductRelations()
1304
    {
1305
        return $this->productRelations;
1306
    }
1307
1308
    /**
1309
     * @param ArrayCollection|ProductRelation[] $productRelations
1310
     * @return ProductInterface
1311
     */
1312
    public function setProductRelations($productRelations)
1313
    {
1314
        $this->productRelations = $productRelations;
1315
        return $this;
1316
    }
1317
1318
    /**
1319
     * @return ProductTypeInterface
1320
     */
1321
    public function getProductType(): ProductTypeInterface
1322
    {
1323
        return $this->productType;
1324
    }
1325
1326
    /**
1327
     * @param ProductType $productType
1328
     * @return ProductInterface
1329
     */
1330
    public function setProductType(ProductType $productType)
1331
    {
1332
        $this->productType = $productType;
1333
        return $this;
1334
    }
1335
1336
    /**
1337
     * @return ArrayCollection|Segment[]
1338
     */
1339
    public function getSegments()
1340
    {
1341
        return $this->segments;
1342
    }
1343
1344
    /**
1345
     * @param ArrayCollection|Segment[] $segments
1346
     * @return ProductInterface
1347
     */
1348
    public function setSegments($segments)
1349
    {
1350
        $this->segments = $segments;
1351
        return $this;
1352
    }
1353
1354
    /**
1355
     * @return ArrayCollection|VariantGroup[]
1356
     */
1357
    public function getVariantGroups()
1358
    {
1359
        return $this->variantGroups;
1360
    }
1361
1362
    /**
1363
     * @param ArrayCollection|VariantGroup[] $variantGroups
1364
     * @return ProductInterface
1365
     */
1366
    public function setVariantGroups($variantGroups)
1367
    {
1368
        $this->variantGroups = $variantGroups;
1369
        return $this;
1370
    }
1371
1372
    /**
1373
     * @return ArrayCollection|Variant[]
1374
     */
1375
    public function getVariants()
1376
    {
1377
        return $this->variants;
1378
    }
1379
1380
    /**
1381
     * @param ArrayCollection|Variant[] $variants
1382
     * @return ProductInterface
1383
     */
1384
    public function setVariants($variants)
1385
    {
1386
        $this->variants = $variants;
1387
        return $this;
1388
    }
1389
1390
    /**
1391
     * @return Product|null
1392
     */
1393
    public function getParent(): ?Product
1394
    {
1395
        return $this->parent;
1396
    }
1397
1398
    /**
1399
     * @param Product|null $parent
1400
     * @return Product
1401
     */
1402
    public function setParent(?Product $parent)
1403
    {
1404
        $this->parent = $parent;
1405
        return $this;
1406
    }
1407
1408
    /**
1409
     * @return ArrayCollection|Product[]
1410
     */
1411
    public function getChildren()
1412
    {
1413
        return $this->children;
1414
    }
1415
1416
    /**
1417
     * @param ArrayCollection|Product[] $children
1418
     * @return Product
1419
     */
1420
    public function setChildren($children)
1421
    {
1422
        $this->children = $children;
1423
        return $this;
1424
    }
1425
}
1426