vendor/shopware/core/Framework/DataAbstractionLayer/Pricing/CalculatedListingPrice.php line 8

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\DataAbstractionLayer\Pricing;
  3. use Shopware\Core\Checkout\Cart\Price\Struct\CalculatedPrice;
  4. use Shopware\Core\Framework\Struct\Struct;
  5. class CalculatedListingPrice extends Struct
  6. {
  7.     /**
  8.      * @var CalculatedPrice
  9.      */
  10.     protected $from;
  11.     /**
  12.      * @var CalculatedPrice
  13.      */
  14.     protected $to;
  15.     public function __construct(CalculatedPrice $fromCalculatedPrice $to)
  16.     {
  17.         $this->from $from;
  18.         $this->to $to;
  19.     }
  20.     public function getFrom(): CalculatedPrice
  21.     {
  22.         return $this->from;
  23.     }
  24.     public function setFrom(CalculatedPrice $from): void
  25.     {
  26.         $this->from $from;
  27.     }
  28.     public function getTo(): CalculatedPrice
  29.     {
  30.         return $this->to;
  31.     }
  32.     public function setTo(CalculatedPrice $to): void
  33.     {
  34.         $this->to $to;
  35.     }
  36.     public function hasRange(): bool
  37.     {
  38.         return $this->getFrom()->getTotalPrice() !== $this->getTo()->getTotalPrice();
  39.     }
  40.     public function getApiAlias(): string
  41.     {
  42.         return 'calculated_listing_price';
  43.     }
  44. }