Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
MsrpPrice.php
Go to the documentation of this file.
1 <?php
8 
12 
16 class MsrpPrice extends FinalPrice implements MsrpPriceInterface
17 {
21  const PRICE_CODE = 'msrp_price';
22 
26  protected $msrpData;
27 
31  protected $config;
32 
41  public function __construct(
42  Product $saleableItem,
43  $quantity,
46  \Magento\Msrp\Helper\Data $msrpData,
47  \Magento\Msrp\Model\Config $config
48  ) {
49  parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
50  $this->msrpData = $msrpData;
51  $this->config = $config;
52  }
53 
59  public function isShowPriceOnGesture()
60  {
61  return $this->msrpData->isShowPriceOnGesture($this->product);
62  }
63 
69  public function getMsrpPriceMessage()
70  {
71  return $this->msrpData->getMsrpPriceMessage($this->product);
72  }
73 
79  public function isMsrpEnabled()
80  {
81  return $this->config->isEnabled();
82  }
83 
90  public function canApplyMsrp(Product $product)
91  {
92  return $this->msrpData->canApplyMsrp($product);
93  }
94 
100  {
101  return $this->msrpData->isMinimalPriceLessMsrp($product);
102  }
103 }
isMinimalPriceLessMsrp(Product $product)
Definition: MsrpPrice.php:99
__construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, \Magento\Msrp\Helper\Data $msrpData, \Magento\Msrp\Model\Config $config)
Definition: MsrpPrice.php:41