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

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