vendor/shopware/core/Content/Product/SalesChannel/SalesChannelProductEntity.php line 14

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Product\SalesChannel;
  3. use Shopware\Core\Checkout\Cart\Price\Struct\CalculatedPrice;
  4. use Shopware\Core\Checkout\Cart\Price\Struct\PriceCollection;
  5. use Shopware\Core\Content\Category\CategoryEntity;
  6. use Shopware\Core\Content\Product\DataAbstractionLayer\CheapestPrice\CalculatedCheapestPrice;
  7. use Shopware\Core\Content\Product\DataAbstractionLayer\CheapestPrice\CheapestPrice;
  8. use Shopware\Core\Content\Product\DataAbstractionLayer\CheapestPrice\CheapestPriceContainer;
  9. use Shopware\Core\Content\Product\ProductEntity;
  10. use Shopware\Core\Content\Property\PropertyGroupCollection;
  11. use Shopware\Core\Framework\Log\Package;
  12. #[Package('inventory')]
  13. class SalesChannelProductEntity extends ProductEntity
  14. {
  15.     /**
  16.      * @var PriceCollection
  17.      */
  18.     protected $calculatedPrices;
  19.     /**
  20.      * @var CalculatedPrice
  21.      */
  22.     protected $calculatedPrice;
  23.     /**
  24.      * @var PropertyGroupCollection|null
  25.      */
  26.     protected $sortedProperties;
  27.     /**
  28.      * @var CalculatedCheapestPrice
  29.      */
  30.     protected $calculatedCheapestPrice;
  31.     /**
  32.      * @var bool
  33.      */
  34.     protected $isNew false;
  35.     /**
  36.      * @var int
  37.      */
  38.     protected $calculatedMaxPurchase;
  39.     /**
  40.      * @var CategoryEntity|null
  41.      */
  42.     protected $seoCategory;
  43.     /**
  44.      * The container will be resolved on product.loaded event and
  45.      * the detected cheapest price will be set for the current context rules
  46.      *
  47.      * @var CheapestPrice|CheapestPriceContainer|null
  48.      */
  49.     protected $cheapestPrice;
  50.     /**
  51.      * @var CheapestPriceContainer|null
  52.      */
  53.     protected $cheapestPriceContainer;
  54.     public function setCalculatedPrices(PriceCollection $prices): void
  55.     {
  56.         $this->calculatedPrices $prices;
  57.     }
  58.     public function getCalculatedPrices(): PriceCollection
  59.     {
  60.         return $this->calculatedPrices;
  61.     }
  62.     public function getCalculatedPrice(): CalculatedPrice
  63.     {
  64.         return $this->calculatedPrice;
  65.     }
  66.     public function setCalculatedPrice(CalculatedPrice $calculatedPrice): void
  67.     {
  68.         $this->calculatedPrice $calculatedPrice;
  69.     }
  70.     public function getSortedProperties(): ?PropertyGroupCollection
  71.     {
  72.         return $this->sortedProperties;
  73.     }
  74.     public function setSortedProperties(?PropertyGroupCollection $sortedProperties): void
  75.     {
  76.         $this->sortedProperties $sortedProperties;
  77.     }
  78.     public function isNew(): bool
  79.     {
  80.         return $this->isNew;
  81.     }
  82.     public function setIsNew(bool $isNew): void
  83.     {
  84.         $this->isNew $isNew;
  85.     }
  86.     public function getCalculatedMaxPurchase(): int
  87.     {
  88.         return $this->calculatedMaxPurchase;
  89.     }
  90.     public function setCalculatedMaxPurchase(int $calculatedMaxPurchase): void
  91.     {
  92.         $this->calculatedMaxPurchase $calculatedMaxPurchase;
  93.     }
  94.     public function getSeoCategory(): ?CategoryEntity
  95.     {
  96.         return $this->seoCategory;
  97.     }
  98.     public function setSeoCategory(?CategoryEntity $category): void
  99.     {
  100.         $this->seoCategory $category;
  101.     }
  102.     public function getCalculatedCheapestPrice(): CalculatedCheapestPrice
  103.     {
  104.         return $this->calculatedCheapestPrice;
  105.     }
  106.     public function setCalculatedCheapestPrice(CalculatedCheapestPrice $calculatedCheapestPrice): void
  107.     {
  108.         $this->calculatedCheapestPrice $calculatedCheapestPrice;
  109.     }
  110.     public function getCheapestPrice(): CheapestPrice|CheapestPriceContainer|null
  111.     {
  112.         return $this->cheapestPrice;
  113.     }
  114.     public function setCheapestPrice(?CheapestPrice $cheapestPrice): void
  115.     {
  116.         $this->cheapestPrice $cheapestPrice;
  117.     }
  118.     public function setCheapestPriceContainer(CheapestPriceContainer $container): void
  119.     {
  120.         $this->cheapestPriceContainer $container;
  121.     }
  122.     public function getCheapestPriceContainer(): ?CheapestPriceContainer
  123.     {
  124.         return $this->cheapestPriceContainer;
  125.     }
  126. }