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

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