vendor/shopware/core/Content/Product/ProductEntity.php line 1267

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Product;
  3. use Shopware\Core\Checkout\Cart\Delivery\Struct\DeliveryDate;
  4. use Shopware\Core\Checkout\Customer\Aggregate\CustomerWishlist\CustomerWishlistCollection;
  5. use Shopware\Core\Checkout\Order\Aggregate\OrderLineItem\OrderLineItemCollection;
  6. use Shopware\Core\Content\Category\CategoryCollection;
  7. use Shopware\Core\Content\Cms\CmsPageEntity;
  8. use Shopware\Core\Content\Product\Aggregate\ProductConfiguratorSetting\ProductConfiguratorSettingCollection;
  9. use Shopware\Core\Content\Product\Aggregate\ProductCrossSelling\ProductCrossSellingCollection;
  10. use Shopware\Core\Content\Product\Aggregate\ProductCrossSellingAssignedProducts\ProductCrossSellingAssignedProductsCollection;
  11. use Shopware\Core\Content\Product\Aggregate\ProductFeatureSet\ProductFeatureSetEntity;
  12. use Shopware\Core\Content\Product\Aggregate\ProductManufacturer\ProductManufacturerEntity;
  13. use Shopware\Core\Content\Product\Aggregate\ProductMedia\ProductMediaCollection;
  14. use Shopware\Core\Content\Product\Aggregate\ProductMedia\ProductMediaEntity;
  15. use Shopware\Core\Content\Product\Aggregate\ProductPrice\ProductPriceCollection;
  16. use Shopware\Core\Content\Product\Aggregate\ProductReview\ProductReviewCollection;
  17. use Shopware\Core\Content\Product\Aggregate\ProductSearchKeyword\ProductSearchKeywordCollection;
  18. use Shopware\Core\Content\Product\Aggregate\ProductTranslation\ProductTranslationCollection;
  19. use Shopware\Core\Content\Product\Aggregate\ProductVisibility\ProductVisibilityCollection;
  20. use Shopware\Core\Content\Product\DataAbstractionLayer\CheapestPrice\CheapestPrice;
  21. use Shopware\Core\Content\Product\DataAbstractionLayer\CheapestPrice\CheapestPriceContainer;
  22. use Shopware\Core\Content\Product\DataAbstractionLayer\VariantListingConfig;
  23. use Shopware\Core\Content\ProductStream\ProductStreamCollection;
  24. use Shopware\Core\Content\Property\Aggregate\PropertyGroupOption\PropertyGroupOptionCollection;
  25. use Shopware\Core\Content\Seo\MainCategory\MainCategoryCollection;
  26. use Shopware\Core\Content\Seo\SeoUrl\SeoUrlCollection;
  27. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  28. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  29. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  30. use Shopware\Core\Framework\DataAbstractionLayer\Pricing\Price;
  31. use Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection;
  32. use Shopware\Core\Framework\Feature;
  33. use Shopware\Core\System\CustomField\Aggregate\CustomFieldSet\CustomFieldSetCollection;
  34. use Shopware\Core\System\DeliveryTime\DeliveryTimeEntity;
  35. use Shopware\Core\System\Tag\TagCollection;
  36. use Shopware\Core\System\Tax\TaxEntity;
  37. use Shopware\Core\System\Unit\UnitEntity;
  38. class ProductEntity extends Entity
  39. {
  40.     use EntityIdTrait;
  41.     use EntityCustomFieldsTrait;
  42.     /**
  43.      * @var string|null
  44.      */
  45.     protected $parentId;
  46.     /**
  47.      * @var int
  48.      */
  49.     protected $childCount;
  50.     /**
  51.      * @var int
  52.      */
  53.     protected $autoIncrement;
  54.     /**
  55.      * @var string|null
  56.      */
  57.     protected $taxId;
  58.     /**
  59.      * @var string|null
  60.      */
  61.     protected $manufacturerId;
  62.     /**
  63.      * @var string|null
  64.      */
  65.     protected $unitId;
  66.     /**
  67.      * @var bool|null
  68.      */
  69.     protected $active;
  70.     /**
  71.      * @var string|null
  72.      */
  73.     protected $displayGroup;
  74.     /**
  75.      * @var PriceCollection|null
  76.      */
  77.     protected $price;
  78.     /**
  79.      * @var string|null
  80.      */
  81.     protected $manufacturerNumber;
  82.     /**
  83.      * @var string|null
  84.      */
  85.     protected $ean;
  86.     /**
  87.      * @var int
  88.      */
  89.     protected $sales;
  90.     /**
  91.      * @var string
  92.      */
  93.     protected $productNumber;
  94.     /**
  95.      * @var int
  96.      */
  97.     protected $stock;
  98.     /**
  99.      * @var int|null
  100.      */
  101.     protected $availableStock;
  102.     /**
  103.      * @var bool
  104.      */
  105.     protected $available;
  106.     /**
  107.      * @var string|null
  108.      */
  109.     protected $deliveryTimeId;
  110.     /**
  111.      * @var DeliveryTimeEntity|null
  112.      */
  113.     protected $deliveryTime;
  114.     /**
  115.      * @var int|null
  116.      */
  117.     protected $restockTime;
  118.     /**
  119.      * @var bool|null
  120.      */
  121.     protected $isCloseout;
  122.     /**
  123.      * @var int|null
  124.      */
  125.     protected $purchaseSteps;
  126.     /**
  127.      * @var int|null
  128.      */
  129.     protected $maxPurchase;
  130.     /**
  131.      * @var int|null
  132.      */
  133.     protected $minPurchase;
  134.     /**
  135.      * @var float|null
  136.      */
  137.     protected $purchaseUnit;
  138.     /**
  139.      * @var float|null
  140.      */
  141.     protected $referenceUnit;
  142.     /**
  143.      * @var bool|null
  144.      */
  145.     protected $shippingFree;
  146.     /**
  147.      * @var PriceCollection|null
  148.      */
  149.     protected $purchasePrices;
  150.     /**
  151.      * @var bool|null
  152.      */
  153.     protected $markAsTopseller;
  154.     /**
  155.      * @var float|null
  156.      */
  157.     protected $weight;
  158.     /**
  159.      * @var float|null
  160.      */
  161.     protected $width;
  162.     /**
  163.      * @var float|null
  164.      */
  165.     protected $height;
  166.     /**
  167.      * @var float|null
  168.      */
  169.     protected $length;
  170.     /**
  171.      * @var \DateTimeInterface|null
  172.      */
  173.     protected $releaseDate;
  174.     /**
  175.      * @var array<string>|null
  176.      */
  177.     protected $categoryTree;
  178.     /**
  179.      * @var array<string>|null
  180.      */
  181.     protected $streamIds;
  182.     /**
  183.      * @var array<string>|null
  184.      */
  185.     protected $optionIds;
  186.     /**
  187.      * @var array<string>|null
  188.      */
  189.     protected $propertyIds;
  190.     /**
  191.      * @var string|null
  192.      */
  193.     protected $name;
  194.     /**
  195.      * @var string|null
  196.      */
  197.     protected $keywords;
  198.     /**
  199.      * @var string|null
  200.      */
  201.     protected $description;
  202.     /**
  203.      * @var string|null
  204.      */
  205.     protected $metaDescription;
  206.     /**
  207.      * @var string|null
  208.      */
  209.     protected $metaTitle;
  210.     /**
  211.      * @var string|null
  212.      */
  213.     protected $packUnit;
  214.     /**
  215.      * @var string|null
  216.      */
  217.     protected $packUnitPlural;
  218.     /**
  219.      * @var array<string>|null
  220.      */
  221.     protected $variantRestrictions;
  222.     /**
  223.      * @deprecated tag:v6.5.0 - Will be removed in v6.5.0.
  224.      *
  225.      * @var array<string>|null
  226.      */
  227.     protected $configuratorGroupConfig;
  228.     /**
  229.      * @deprecated tag:v6.5.0 - Will be removed in v6.5.0.
  230.      *
  231.      * @var string|null
  232.      */
  233.     protected $mainVariantId;
  234.     /**
  235.      * @deprecated tag:v6.5.0 - Will be removed in v6.5.0.
  236.      *
  237.      * @var bool|null
  238.      */
  239.     protected $displayParent;
  240.     /**
  241.      * @var VariantListingConfig|null
  242.      */
  243.     protected $variantListingConfig;
  244.     /**
  245.      * @var array<string>
  246.      */
  247.     protected $variation = [];
  248.     /**
  249.      * @var TaxEntity|null
  250.      */
  251.     protected $tax;
  252.     /**
  253.      * @var ProductManufacturerEntity|null
  254.      */
  255.     protected $manufacturer;
  256.     /**
  257.      * @var UnitEntity|null
  258.      */
  259.     protected $unit;
  260.     /**
  261.      * @var ProductPriceCollection
  262.      */
  263.     protected $prices;
  264.     /**
  265.      * The container will be resolved on product.loaded event and
  266.      * the detected cheapest price will be set for the current context rules
  267.      *
  268.      * @feature-deprecated  (flag:FEATURE_NEXT_15815) tag:v6.5.0 - CheapestPrice will only be available for SalesChannelProductEntity
  269.      *
  270.      * @var CheapestPrice|CheapestPriceContainer|null
  271.      */
  272.     protected $cheapestPrice;
  273.     /**
  274.      * @var ProductMediaEntity|null
  275.      */
  276.     protected $cover;
  277.     /**
  278.      * @var ProductEntity|null
  279.      */
  280.     protected $parent;
  281.     /**
  282.      * @var ProductCollection|null
  283.      */
  284.     protected $children;
  285.     /**
  286.      * @var ProductMediaCollection|null
  287.      */
  288.     protected $media;
  289.     /**
  290.      * @var string|null
  291.      */
  292.     protected $cmsPageId;
  293.     /**
  294.      * @var CmsPageEntity|null
  295.      */
  296.     protected $cmsPage;
  297.     /**
  298.      * @var array<string, array<string, array<string, string>>>|null
  299.      */
  300.     protected $slotConfig;
  301.     /**
  302.      * @var ProductSearchKeywordCollection|null
  303.      */
  304.     protected $searchKeywords;
  305.     /**
  306.      * @var ProductTranslationCollection|null
  307.      */
  308.     protected $translations;
  309.     /**
  310.      * @var CategoryCollection|null
  311.      */
  312.     protected $categories;
  313.     /**
  314.      * @var CustomFieldSetCollection|null
  315.      */
  316.     protected $customFieldSets;
  317.     /**
  318.      * @var TagCollection|null
  319.      */
  320.     protected $tags;
  321.     /**
  322.      * @var PropertyGroupOptionCollection|null
  323.      */
  324.     protected $properties;
  325.     /**
  326.      * @var PropertyGroupOptionCollection|null
  327.      */
  328.     protected $options;
  329.     /**
  330.      * @var ProductConfiguratorSettingCollection|null
  331.      */
  332.     protected $configuratorSettings;
  333.     /**
  334.      * @var CategoryCollection|null
  335.      */
  336.     protected $categoriesRo;
  337.     /**
  338.      * @var string|null
  339.      */
  340.     protected $coverId;
  341.     /**
  342.      * @var array<string>|null
  343.      */
  344.     protected $blacklistIds;
  345.     /**
  346.      * @var array<string>|null
  347.      */
  348.     protected $whitelistIds;
  349.     /**
  350.      * @var ProductVisibilityCollection|null
  351.      */
  352.     protected $visibilities;
  353.     /**
  354.      * @var array<string>|null
  355.      */
  356.     protected $tagIds;
  357.     /**
  358.      * @var array<string>|null
  359.      */
  360.     protected $categoryIds;
  361.     /**
  362.      * @var ProductReviewCollection|null
  363.      */
  364.     protected $productReviews;
  365.     /**
  366.      * @var float|null
  367.      */
  368.     protected $ratingAverage;
  369.     /**
  370.      * @var MainCategoryCollection|null
  371.      */
  372.     protected $mainCategories;
  373.     /**
  374.      * @var SeoUrlCollection|null
  375.      */
  376.     protected $seoUrls;
  377.     /**
  378.      * @var OrderLineItemCollection|null
  379.      */
  380.     protected $orderLineItems;
  381.     /**
  382.      * @var ProductCrossSellingCollection|null
  383.      */
  384.     protected $crossSellings;
  385.     /**
  386.      * @var ProductCrossSellingAssignedProductsCollection|null
  387.      */
  388.     protected $crossSellingAssignedProducts;
  389.     /**
  390.      * @var string|null
  391.      */
  392.     protected $featureSetId;
  393.     /**
  394.      * @var ProductFeatureSetEntity|null
  395.      */
  396.     protected $featureSet;
  397.     /**
  398.      * @var bool|null
  399.      */
  400.     protected $customFieldSetSelectionActive;
  401.     /**
  402.      * @var array<string>|null
  403.      */
  404.     protected $customSearchKeywords;
  405.     /**
  406.      * @var CustomerWishlistCollection|null
  407.      */
  408.     protected $wishlists;
  409.     /**
  410.      * @var string|null
  411.      */
  412.     protected $canonicalProductId;
  413.     /**
  414.      * @var ProductEntity|null
  415.      */
  416.     protected $canonicalProduct;
  417.     /**
  418.      * @feature-deprecated  (flag:FEATURE_NEXT_15815) tag:v6.5.0 - CheapestPrice will only be available for SalesChannelProductEntity
  419.      *
  420.      * @var CheapestPriceContainer|null
  421.      */
  422.     protected $cheapestPriceContainer;
  423.     /**
  424.      * @var ProductStreamCollection|null
  425.      */
  426.     protected $streams;
  427.     public function __construct()
  428.     {
  429.         $this->prices = new ProductPriceCollection();
  430.     }
  431.     public function __toString()
  432.     {
  433.         return (string) $this->getName();
  434.     }
  435.     public function getProductReviews(): ?ProductReviewCollection
  436.     {
  437.         return $this->productReviews;
  438.     }
  439.     public function setProductReviews(ProductReviewCollection $productReviews): void
  440.     {
  441.         $this->productReviews $productReviews;
  442.     }
  443.     public function getParentId(): ?string
  444.     {
  445.         return $this->parentId;
  446.     }
  447.     public function setParentId(?string $parentId): void
  448.     {
  449.         $this->parentId $parentId;
  450.     }
  451.     public function getTaxId(): ?string
  452.     {
  453.         return $this->taxId;
  454.     }
  455.     public function setTaxId(?string $taxId): void
  456.     {
  457.         $this->taxId $taxId;
  458.     }
  459.     public function getManufacturerId(): ?string
  460.     {
  461.         return $this->manufacturerId;
  462.     }
  463.     public function setManufacturerId(?string $manufacturerId): void
  464.     {
  465.         $this->manufacturerId $manufacturerId;
  466.     }
  467.     public function getUnitId(): ?string
  468.     {
  469.         return $this->unitId;
  470.     }
  471.     public function setUnitId(?string $unitId): void
  472.     {
  473.         $this->unitId $unitId;
  474.     }
  475.     public function getActive(): ?bool
  476.     {
  477.         return $this->active;
  478.     }
  479.     public function setActive(?bool $active): void
  480.     {
  481.         $this->active $active;
  482.     }
  483.     public function getPrice(): ?PriceCollection
  484.     {
  485.         return $this->price;
  486.     }
  487.     public function setPrice(PriceCollection $price): void
  488.     {
  489.         $this->price $price;
  490.     }
  491.     public function getCurrencyPrice(string $currencyId): ?Price
  492.     {
  493.         if ($this->price === null) {
  494.             return null;
  495.         }
  496.         return $this->price->getCurrencyPrice($currencyId);
  497.     }
  498.     public function getManufacturerNumber(): ?string
  499.     {
  500.         return $this->manufacturerNumber;
  501.     }
  502.     public function setManufacturerNumber(?string $manufacturerNumber): void
  503.     {
  504.         $this->manufacturerNumber $manufacturerNumber;
  505.     }
  506.     public function getEan(): ?string
  507.     {
  508.         return $this->ean;
  509.     }
  510.     public function setEan(?string $ean): void
  511.     {
  512.         $this->ean $ean;
  513.     }
  514.     public function getSales(): int
  515.     {
  516.         return $this->sales;
  517.     }
  518.     public function setSales(int $sales): void
  519.     {
  520.         $this->sales $sales;
  521.     }
  522.     public function getStock(): int
  523.     {
  524.         return $this->stock;
  525.     }
  526.     public function setStock(int $stock): void
  527.     {
  528.         $this->stock $stock;
  529.     }
  530.     public function getIsCloseout(): bool
  531.     {
  532.         return (bool) $this->isCloseout;
  533.     }
  534.     public function setIsCloseout(?bool $isCloseout): void
  535.     {
  536.         $this->isCloseout $isCloseout;
  537.     }
  538.     public function getPurchaseSteps(): ?int
  539.     {
  540.         return $this->purchaseSteps;
  541.     }
  542.     public function setPurchaseSteps(?int $purchaseSteps): void
  543.     {
  544.         $this->purchaseSteps $purchaseSteps;
  545.     }
  546.     public function getMaxPurchase(): ?int
  547.     {
  548.         return $this->maxPurchase;
  549.     }
  550.     public function setMaxPurchase(?int $maxPurchase): void
  551.     {
  552.         $this->maxPurchase $maxPurchase;
  553.     }
  554.     public function getMinPurchase(): ?int
  555.     {
  556.         return $this->minPurchase;
  557.     }
  558.     public function setMinPurchase(?int $minPurchase): void
  559.     {
  560.         $this->minPurchase $minPurchase;
  561.     }
  562.     public function getPurchaseUnit(): ?float
  563.     {
  564.         return $this->purchaseUnit;
  565.     }
  566.     public function setPurchaseUnit(?float $purchaseUnit): void
  567.     {
  568.         $this->purchaseUnit $purchaseUnit;
  569.     }
  570.     public function getReferenceUnit(): ?float
  571.     {
  572.         return $this->referenceUnit;
  573.     }
  574.     public function setReferenceUnit(?float $referenceUnit): void
  575.     {
  576.         $this->referenceUnit $referenceUnit;
  577.     }
  578.     public function getShippingFree(): ?bool
  579.     {
  580.         return $this->shippingFree;
  581.     }
  582.     public function setShippingFree(?bool $shippingFree): void
  583.     {
  584.         $this->shippingFree $shippingFree;
  585.     }
  586.     public function getPurchasePrices(): ?PriceCollection
  587.     {
  588.         return $this->purchasePrices;
  589.     }
  590.     public function setPurchasePrices(?PriceCollection $purchasePrices): void
  591.     {
  592.         $this->purchasePrices $purchasePrices;
  593.     }
  594.     public function getMarkAsTopseller(): ?bool
  595.     {
  596.         return $this->markAsTopseller;
  597.     }
  598.     public function setMarkAsTopseller(?bool $markAsTopseller): void
  599.     {
  600.         $this->markAsTopseller $markAsTopseller;
  601.     }
  602.     public function getWeight(): ?float
  603.     {
  604.         return $this->weight;
  605.     }
  606.     public function setWeight(?float $weight): void
  607.     {
  608.         $this->weight $weight;
  609.     }
  610.     public function getWidth(): ?float
  611.     {
  612.         return $this->width;
  613.     }
  614.     public function setWidth(?float $width): void
  615.     {
  616.         $this->width $width;
  617.     }
  618.     public function getHeight(): ?float
  619.     {
  620.         return $this->height;
  621.     }
  622.     public function setHeight(?float $height): void
  623.     {
  624.         $this->height $height;
  625.     }
  626.     public function getLength(): ?float
  627.     {
  628.         return $this->length;
  629.     }
  630.     public function setLength(?float $length): void
  631.     {
  632.         $this->length $length;
  633.     }
  634.     public function getReleaseDate(): ?\DateTimeInterface
  635.     {
  636.         return $this->releaseDate;
  637.     }
  638.     public function setReleaseDate(?\DateTimeInterface $releaseDate): void
  639.     {
  640.         $this->releaseDate $releaseDate;
  641.     }
  642.     /**
  643.      * @return array<string>|null
  644.      */
  645.     public function getCategoryTree(): ?array
  646.     {
  647.         return $this->categoryTree;
  648.     }
  649.     /**
  650.      * @param array<string>|null $categoryTree
  651.      */
  652.     public function setCategoryTree(?array $categoryTree): void
  653.     {
  654.         $this->categoryTree $categoryTree;
  655.     }
  656.     public function getName(): ?string
  657.     {
  658.         return $this->name;
  659.     }
  660.     public function setName(?string $name): void
  661.     {
  662.         $this->name $name;
  663.     }
  664.     public function getKeywords(): ?string
  665.     {
  666.         return $this->keywords;
  667.     }
  668.     public function setKeywords(?string $keywords): void
  669.     {
  670.         $this->keywords $keywords;
  671.     }
  672.     public function getDescription(): ?string
  673.     {
  674.         return $this->description;
  675.     }
  676.     public function setDescription(?string $description): void
  677.     {
  678.         $this->description $description;
  679.     }
  680.     public function getMetaTitle(): ?string
  681.     {
  682.         return $this->metaTitle;
  683.     }
  684.     public function setMetaTitle(?string $metaTitle): void
  685.     {
  686.         $this->metaTitle $metaTitle;
  687.     }
  688.     public function getPackUnit(): ?string
  689.     {
  690.         return $this->packUnit;
  691.     }
  692.     public function setPackUnit(?string $packUnit): void
  693.     {
  694.         $this->packUnit $packUnit;
  695.     }
  696.     public function getPackUnitPlural(): ?string
  697.     {
  698.         return $this->packUnitPlural;
  699.     }
  700.     public function setPackUnitPlural(?string $packUnitPlural): void
  701.     {
  702.         $this->packUnitPlural $packUnitPlural;
  703.     }
  704.     public function getTax(): ?TaxEntity
  705.     {
  706.         return $this->tax;
  707.     }
  708.     public function setTax(TaxEntity $tax): void
  709.     {
  710.         $this->tax $tax;
  711.     }
  712.     public function getManufacturer(): ?ProductManufacturerEntity
  713.     {
  714.         return $this->manufacturer;
  715.     }
  716.     public function setManufacturer(ProductManufacturerEntity $manufacturer): void
  717.     {
  718.         $this->manufacturer $manufacturer;
  719.     }
  720.     public function getUnit(): ?UnitEntity
  721.     {
  722.         return $this->unit;
  723.     }
  724.     public function setUnit(UnitEntity $unit): void
  725.     {
  726.         $this->unit $unit;
  727.     }
  728.     public function getPrices(): ?ProductPriceCollection
  729.     {
  730.         return $this->prices;
  731.     }
  732.     public function setPrices(ProductPriceCollection $prices): void
  733.     {
  734.         $this->prices $prices;
  735.     }
  736.     public function getRestockTime(): ?int
  737.     {
  738.         return $this->restockTime;
  739.     }
  740.     public function setRestockTime(?int $restockTime): void
  741.     {
  742.         $this->restockTime $restockTime;
  743.     }
  744.     public function getDeliveryDate(): DeliveryDate
  745.     {
  746.         return new DeliveryDate(
  747.             (new \DateTime())
  748.                 ->add(new \DateInterval('P' 'D')),
  749.             (new \DateTime())
  750.                 ->add(new \DateInterval('P' 'D'))
  751.                 ->add(new \DateInterval('P' 'D'))
  752.         );
  753.     }
  754.     public function getRestockDeliveryDate(): DeliveryDate
  755.     {
  756.         $deliveryDate $this->getDeliveryDate();
  757.         return $deliveryDate->add(new \DateInterval('P' $this->getRestockTime() . 'D'));
  758.     }
  759.     public function isReleased(): bool
  760.     {
  761.         if (!$this->getReleaseDate()) {
  762.             return true;
  763.         }
  764.         return $this->releaseDate < new \DateTime();
  765.     }
  766.     /**
  767.      * @return array<string>|null
  768.      */
  769.     public function getStreamIds(): ?array
  770.     {
  771.         return $this->streamIds;
  772.     }
  773.     /**
  774.      * @param array<string>|null $streamIds
  775.      */
  776.     public function setStreamIds(?array $streamIds): void
  777.     {
  778.         $this->streamIds $streamIds;
  779.     }
  780.     /**
  781.      * @return array<string>|null
  782.      */
  783.     public function getOptionIds(): ?array
  784.     {
  785.         return $this->optionIds;
  786.     }
  787.     /**
  788.      * @param array<string>|null $optionIds
  789.      */
  790.     public function setOptionIds(?array $optionIds): void
  791.     {
  792.         $this->optionIds $optionIds;
  793.     }
  794.     /**
  795.      * @return array<string>|null
  796.      */
  797.     public function getPropertyIds(): ?array
  798.     {
  799.         return $this->propertyIds;
  800.     }
  801.     /**
  802.      * @param array<string>|null $propertyIds
  803.      */
  804.     public function setPropertyIds(?array $propertyIds): void
  805.     {
  806.         $this->propertyIds $propertyIds;
  807.     }
  808.     public function getCover(): ?ProductMediaEntity
  809.     {
  810.         return $this->cover;
  811.     }
  812.     public function setCover(ProductMediaEntity $cover): void
  813.     {
  814.         $this->cover $cover;
  815.     }
  816.     public function getCmsPage(): ?CmsPageEntity
  817.     {
  818.         return $this->cmsPage;
  819.     }
  820.     public function setCmsPage(CmsPageEntity $cmsPage): void
  821.     {
  822.         $this->cmsPage $cmsPage;
  823.     }
  824.     public function getCmsPageId(): ?string
  825.     {
  826.         return $this->cmsPageId;
  827.     }
  828.     public function setCmsPageId(string $cmsPageId): void
  829.     {
  830.         $this->cmsPageId $cmsPageId;
  831.     }
  832.     /**
  833.      * @return array<string, array<string, array<string, string>>>|null
  834.      */
  835.     public function getSlotConfig(): ?array
  836.     {
  837.         return $this->slotConfig;
  838.     }
  839.     /**
  840.      * @param array<string, array<string, array<string, string>>> $slotConfig
  841.      */
  842.     public function setSlotConfig(array $slotConfig): void
  843.     {
  844.         $this->slotConfig $slotConfig;
  845.     }
  846.     public function getParent(): ?ProductEntity
  847.     {
  848.         return $this->parent;
  849.     }
  850.     public function setParent(ProductEntity $parent): void
  851.     {
  852.         $this->parent $parent;
  853.     }
  854.     public function getChildren(): ?ProductCollection
  855.     {
  856.         return $this->children;
  857.     }
  858.     public function setChildren(ProductCollection $children): void
  859.     {
  860.         $this->children $children;
  861.     }
  862.     public function getMedia(): ?ProductMediaCollection
  863.     {
  864.         return $this->media;
  865.     }
  866.     public function setMedia(ProductMediaCollection $media): void
  867.     {
  868.         $this->media $media;
  869.     }
  870.     public function getSearchKeywords(): ?ProductSearchKeywordCollection
  871.     {
  872.         return $this->searchKeywords;
  873.     }
  874.     public function setSearchKeywords(ProductSearchKeywordCollection $searchKeywords): void
  875.     {
  876.         $this->searchKeywords $searchKeywords;
  877.     }
  878.     public function getTranslations(): ?ProductTranslationCollection
  879.     {
  880.         return $this->translations;
  881.     }
  882.     public function setTranslations(ProductTranslationCollection $translations): void
  883.     {
  884.         $this->translations $translations;
  885.     }
  886.     public function getCategories(): ?CategoryCollection
  887.     {
  888.         return $this->categories;
  889.     }
  890.     public function setCategories(CategoryCollection $categories): void
  891.     {
  892.         $this->categories $categories;
  893.     }
  894.     public function getCustomFieldSets(): ?CustomFieldSetCollection
  895.     {
  896.         return $this->customFieldSets;
  897.     }
  898.     public function setCustomFieldSets(CustomFieldSetCollection $customFieldSets): void
  899.     {
  900.         $this->customFieldSets $customFieldSets;
  901.     }
  902.     public function getTags(): ?TagCollection
  903.     {
  904.         return $this->tags;
  905.     }
  906.     public function setTags(TagCollection $tags): void
  907.     {
  908.         $this->tags $tags;
  909.     }
  910.     public function getProperties(): ?PropertyGroupOptionCollection
  911.     {
  912.         return $this->properties;
  913.     }
  914.     public function setProperties(PropertyGroupOptionCollection $properties): void
  915.     {
  916.         $this->properties $properties;
  917.     }
  918.     public function getOptions(): ?PropertyGroupOptionCollection
  919.     {
  920.         return $this->options;
  921.     }
  922.     public function setOptions(PropertyGroupOptionCollection $options): void
  923.     {
  924.         $this->options $options;
  925.     }
  926.     public function getConfiguratorSettings(): ?ProductConfiguratorSettingCollection
  927.     {
  928.         return $this->configuratorSettings;
  929.     }
  930.     public function setConfiguratorSettings(ProductConfiguratorSettingCollection $configuratorSettings): void
  931.     {
  932.         $this->configuratorSettings $configuratorSettings;
  933.     }
  934.     public function getCategoriesRo(): ?CategoryCollection
  935.     {
  936.         return $this->categoriesRo;
  937.     }
  938.     public function setCategoriesRo(CategoryCollection $categoriesRo): void
  939.     {
  940.         $this->categoriesRo $categoriesRo;
  941.     }
  942.     public function getAutoIncrement(): int
  943.     {
  944.         return $this->autoIncrement;
  945.     }
  946.     public function setAutoIncrement(int $autoIncrement): void
  947.     {
  948.         $this->autoIncrement $autoIncrement;
  949.     }
  950.     public function getCoverId(): ?string
  951.     {
  952.         return $this->coverId;
  953.     }
  954.     public function setCoverId(string $coverId): void
  955.     {
  956.         $this->coverId $coverId;
  957.     }
  958.     /**
  959.      * @return array<string>|null
  960.      */
  961.     public function getBlacklistIds(): ?array
  962.     {
  963.         return $this->blacklistIds;
  964.     }
  965.     /**
  966.      * @param array<string>|null $blacklistIds
  967.      */
  968.     public function setBlacklistIds(?array $blacklistIds): void
  969.     {
  970.         $this->blacklistIds $blacklistIds;
  971.     }
  972.     /**
  973.      * @return array<string>|null
  974.      */
  975.     public function getWhitelistIds(): ?array
  976.     {
  977.         return $this->whitelistIds;
  978.     }
  979.     /**
  980.      * @param array<string>|null $whitelistIds
  981.      */
  982.     public function setWhitelistIds(?array $whitelistIds): void
  983.     {
  984.         $this->whitelistIds $whitelistIds;
  985.     }
  986.     public function getVisibilities(): ?ProductVisibilityCollection
  987.     {
  988.         return $this->visibilities;
  989.     }
  990.     public function setVisibilities(ProductVisibilityCollection $visibilities): void
  991.     {
  992.         $this->visibilities $visibilities;
  993.     }
  994.     public function getProductNumber(): string
  995.     {
  996.         return $this->productNumber;
  997.     }
  998.     public function setProductNumber(string $productNumber): void
  999.     {
  1000.         $this->productNumber $productNumber;
  1001.     }
  1002.     /**
  1003.      * @return array<string>|null
  1004.      */
  1005.     public function getTagIds(): ?array
  1006.     {
  1007.         return $this->tagIds;
  1008.     }
  1009.     /**
  1010.      * @param array<string> $tagIds
  1011.      */
  1012.     public function setTagIds(array $tagIds): void
  1013.     {
  1014.         $this->tagIds $tagIds;
  1015.     }
  1016.     /**
  1017.      * @return array<string>|null
  1018.      */
  1019.     public function getVariantRestrictions(): ?array
  1020.     {
  1021.         return $this->variantRestrictions;
  1022.     }
  1023.     /**
  1024.      * @param array<string>|null $variantRestrictions
  1025.      */
  1026.     public function setVariantRestrictions(?array $variantRestrictions): void
  1027.     {
  1028.         $this->variantRestrictions $variantRestrictions;
  1029.     }
  1030.     /**
  1031.      * @return array<string>|null
  1032.      */
  1033.     public function getConfiguratorGroupConfig(): ?array
  1034.     {
  1035.         Feature::triggerDeprecationOrThrow(
  1036.             'v6.5.0.0',
  1037.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0')
  1038.         );
  1039.         return $this->configuratorGroupConfig;
  1040.     }
  1041.     /**
  1042.      * @param array<string>|null $configuratorGroupConfig
  1043.      */
  1044.     public function setConfiguratorGroupConfig(?array $configuratorGroupConfig): void
  1045.     {
  1046.         Feature::triggerDeprecationOrThrow(
  1047.             'v6.5.0.0',
  1048.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0')
  1049.         );
  1050.         $this->configuratorGroupConfig $configuratorGroupConfig;
  1051.     }
  1052.     public function getMainVariantId(): ?string
  1053.     {
  1054.         Feature::triggerDeprecationOrThrow(
  1055.             'v6.5.0.0',
  1056.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0')
  1057.         );
  1058.         return $this->mainVariantId;
  1059.     }
  1060.     public function setMainVariantId(?string $mainVariantId): void
  1061.     {
  1062.         Feature::triggerDeprecationOrThrow(
  1063.             'v6.5.0.0',
  1064.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0')
  1065.         );
  1066.         $this->mainVariantId $mainVariantId;
  1067.     }
  1068.     public function getDisplayParent(): ?bool
  1069.     {
  1070.         Feature::triggerDeprecationOrThrow(
  1071.             'v6.5.0.0',
  1072.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0')
  1073.         );
  1074.         return $this->displayParent;
  1075.     }
  1076.     public function setDisplayParent(?bool $displayParent): void
  1077.     {
  1078.         Feature::triggerDeprecationOrThrow(
  1079.             'v6.5.0.0',
  1080.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0')
  1081.         );
  1082.         $this->displayParent $displayParent;
  1083.     }
  1084.     public function getVariantListingConfig(): ?VariantListingConfig
  1085.     {
  1086.         return $this->variantListingConfig;
  1087.     }
  1088.     public function setVariantListingConfig(?VariantListingConfig $variantListingConfig): void
  1089.     {
  1090.         $this->variantListingConfig $variantListingConfig;
  1091.     }
  1092.     /**
  1093.      * @return array<string>
  1094.      */
  1095.     public function getVariation(): array
  1096.     {
  1097.         return $this->variation;
  1098.     }
  1099.     /**
  1100.      * @param array<string> $variation
  1101.      */
  1102.     public function setVariation(array $variation): void
  1103.     {
  1104.         $this->variation $variation;
  1105.     }
  1106.     public function getAvailableStock(): ?int
  1107.     {
  1108.         return $this->availableStock;
  1109.     }
  1110.     public function setAvailableStock(int $availableStock): void
  1111.     {
  1112.         $this->availableStock $availableStock;
  1113.     }
  1114.     public function getAvailable(): bool
  1115.     {
  1116.         return $this->available;
  1117.     }
  1118.     public function setAvailable(bool $available): void
  1119.     {
  1120.         $this->available $available;
  1121.     }
  1122.     public function getDeliveryTimeId(): ?string
  1123.     {
  1124.         return $this->deliveryTimeId;
  1125.     }
  1126.     public function setDeliveryTimeId(?string $deliveryTimeId): void
  1127.     {
  1128.         $this->deliveryTimeId $deliveryTimeId;
  1129.     }
  1130.     public function getDeliveryTime(): ?DeliveryTimeEntity
  1131.     {
  1132.         return $this->deliveryTime;
  1133.     }
  1134.     public function setDeliveryTime(?DeliveryTimeEntity $deliveryTime): void
  1135.     {
  1136.         $this->deliveryTime $deliveryTime;
  1137.     }
  1138.     public function getChildCount(): ?int
  1139.     {
  1140.         return $this->childCount;
  1141.     }
  1142.     public function setChildCount(int $childCount): void
  1143.     {
  1144.         $this->childCount $childCount;
  1145.     }
  1146.     public function getRatingAverage(): ?float
  1147.     {
  1148.         return $this->ratingAverage;
  1149.     }
  1150.     public function setRatingAverage(?float $ratingAverage): void
  1151.     {
  1152.         $this->ratingAverage $ratingAverage;
  1153.     }
  1154.     public function getDisplayGroup(): ?string
  1155.     {
  1156.         return $this->displayGroup;
  1157.     }
  1158.     public function setDisplayGroup(?string $displayGroup): void
  1159.     {
  1160.         $this->displayGroup $displayGroup;
  1161.     }
  1162.     public function getMainCategories(): ?MainCategoryCollection
  1163.     {
  1164.         return $this->mainCategories;
  1165.     }
  1166.     public function setMainCategories(MainCategoryCollection $mainCategories): void
  1167.     {
  1168.         $this->mainCategories $mainCategories;
  1169.     }
  1170.     public function getMetaDescription(): ?string
  1171.     {
  1172.         return $this->metaDescription;
  1173.     }
  1174.     public function setMetaDescription(?string $metaDescription): void
  1175.     {
  1176.         $this->metaDescription $metaDescription;
  1177.     }
  1178.     public function getSeoUrls(): ?SeoUrlCollection
  1179.     {
  1180.         return $this->seoUrls;
  1181.     }
  1182.     public function setSeoUrls(SeoUrlCollection $seoUrls): void
  1183.     {
  1184.         $this->seoUrls $seoUrls;
  1185.     }
  1186.     public function getOrderLineItems(): ?OrderLineItemCollection
  1187.     {
  1188.         return $this->orderLineItems;
  1189.     }
  1190.     public function setOrderLineItems(OrderLineItemCollection $orderLineItems): void
  1191.     {
  1192.         $this->orderLineItems $orderLineItems;
  1193.     }
  1194.     public function getCrossSellings(): ?ProductCrossSellingCollection
  1195.     {
  1196.         return $this->crossSellings;
  1197.     }
  1198.     public function setCrossSellings(ProductCrossSellingCollection $crossSellings): void
  1199.     {
  1200.         $this->crossSellings $crossSellings;
  1201.     }
  1202.     public function getCrossSellingAssignedProducts(): ?ProductCrossSellingAssignedProductsCollection
  1203.     {
  1204.         return $this->crossSellingAssignedProducts;
  1205.     }
  1206.     public function setCrossSellingAssignedProducts(ProductCrossSellingAssignedProductsCollection $crossSellingAssignedProducts): void
  1207.     {
  1208.         $this->crossSellingAssignedProducts $crossSellingAssignedProducts;
  1209.     }
  1210.     public function getFeatureSetId(): ?string
  1211.     {
  1212.         return $this->featureSetId;
  1213.     }
  1214.     public function setFeatureSetId(?string $featureSetId): void
  1215.     {
  1216.         $this->featureSetId $featureSetId;
  1217.     }
  1218.     public function getFeatureSet(): ?ProductFeatureSetEntity
  1219.     {
  1220.         return $this->featureSet;
  1221.     }
  1222.     public function setFeatureSet(ProductFeatureSetEntity $featureSet): void
  1223.     {
  1224.         $this->featureSet $featureSet;
  1225.     }
  1226.     public function getCustomFieldSetSelectionActive(): ?bool
  1227.     {
  1228.         return $this->customFieldSetSelectionActive;
  1229.     }
  1230.     public function setCustomFieldSetSelectionActive(?bool $customFieldSetSelectionActive): void
  1231.     {
  1232.         $this->customFieldSetSelectionActive $customFieldSetSelectionActive;
  1233.     }
  1234.     /**
  1235.      * @return array<string>|null
  1236.      */
  1237.     public function getCustomSearchKeywords(): ?array
  1238.     {
  1239.         return $this->customSearchKeywords;
  1240.     }
  1241.     /**
  1242.      * @param array<string>|null $customSearchKeywords
  1243.      */
  1244.     public function setCustomSearchKeywords(?array $customSearchKeywords): void
  1245.     {
  1246.         $this->customSearchKeywords $customSearchKeywords;
  1247.     }
  1248.     public function getWishlists(): ?CustomerWishlistCollection
  1249.     {
  1250.         return $this->wishlists;
  1251.     }
  1252.     public function setWishlists(CustomerWishlistCollection $wishlists): void
  1253.     {
  1254.         $this->wishlists $wishlists;
  1255.     }
  1256.     public function getCanonicalProductId(): ?string
  1257.     {
  1258.         return $this->canonicalProductId;
  1259.     }
  1260.     public function setCanonicalProductId(string $canonicalProductId): void
  1261.     {
  1262.         $this->canonicalProductId $canonicalProductId;
  1263.     }
  1264.     public function getCanonicalProduct(): ?ProductEntity
  1265.     {
  1266.         return $this->canonicalProduct;
  1267.     }
  1268.     public function setCanonicalProduct(ProductEntity $product): void
  1269.     {
  1270.         $this->canonicalProduct $product;
  1271.     }
  1272.     /**
  1273.      * @feature-deprecated  (flag:FEATURE_NEXT_15815) tag:v6.5.0 - CheapestPrice will only be available for SalesChannelProductEntity
  1274.      *
  1275.      * @return CheapestPrice|CheapestPriceContainer|null
  1276.      */
  1277.     public function getCheapestPrice()
  1278.     {
  1279.         return $this->cheapestPrice;
  1280.     }
  1281.     /**
  1282.      * @feature-deprecated  (flag:FEATURE_NEXT_15815) tag:v6.5.0 - CheapestPrice will only be available for SalesChannelProductEntity
  1283.      */
  1284.     public function setCheapestPrice(?CheapestPrice $cheapestPrice): void
  1285.     {
  1286.         $this->cheapestPrice $cheapestPrice;
  1287.     }
  1288.     /**
  1289.      * @feature-deprecated  (flag:FEATURE_NEXT_15815) tag:v6.5.0 - CheapestPrice will only be available for SalesChannelProductEntity
  1290.      */
  1291.     public function setCheapestPriceContainer(CheapestPriceContainer $container): void
  1292.     {
  1293.         $this->cheapestPriceContainer $container;
  1294.     }
  1295.     /**
  1296.      * @feature-deprecated  (flag:FEATURE_NEXT_15815) tag:v6.5.0 - CheapestPrice will only be available for SalesChannelProductEntity
  1297.      */
  1298.     public function getCheapestPriceContainer(): ?CheapestPriceContainer
  1299.     {
  1300.         return $this->cheapestPriceContainer;
  1301.     }
  1302.     public function getStreams(): ?ProductStreamCollection
  1303.     {
  1304.         return $this->streams;
  1305.     }
  1306.     public function setStreams(ProductStreamCollection $streams): void
  1307.     {
  1308.         $this->streams $streams;
  1309.     }
  1310.     /**
  1311.      * @return array<string>|null
  1312.      */
  1313.     public function getCategoryIds(): ?array
  1314.     {
  1315.         return $this->categoryIds;
  1316.     }
  1317.     /**
  1318.      * @param array<string>|null $categoryIds
  1319.      */
  1320.     public function setCategoryIds(?array $categoryIds): void
  1321.     {
  1322.         $this->categoryIds $categoryIds;
  1323.     }
  1324. }