Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
BasePrice Class Reference
Inheritance diagram for BasePrice:
AbstractPrice PriceInterface

Public Member Functions

 getValue ()
 
- Public Member Functions inherited from AbstractPrice
 __construct (SaleableInterface $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency)
 
 getValue ()
 
 getAmount ()
 
 getCustomAmount ($amount=null, $exclude=null, $context=[])
 
 getPriceCode ()
 
 getProduct ()
 
 getQuantity ()
 

Data Fields

const PRICE_CODE = 'base_price'
 
- Data Fields inherited from AbstractPrice
const PRICE_CODE = 'abstract_price'
 

Additional Inherited Members

- Protected Attributes inherited from AbstractPrice
 $amount
 
 $calculator
 
 $product
 
 $priceType
 
 $quantity
 
 $priceInfo
 
 $value
 
 $priceCurrency
 

Detailed Description

Class BasePrice

Definition at line 15 of file BasePrice.php.

Member Function Documentation

◆ getValue()

getValue ( )

Get Base Price Value

Returns
float|bool

Implements PriceInterface.

Definition at line 27 of file BasePrice.php.

28  {
29  if ($this->value === null) {
30  $this->value = false;
31  foreach ($this->priceInfo->getPrices() as $price) {
32  if ($price instanceof BasePriceProviderInterface && $price->getValue() !== false) {
33  $this->value = min($price->getValue(), $this->value ?: $price->getValue());
34  }
35  }
36  }
37  return $this->value;
38  }
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition: block.php:9
$price

Field Documentation

◆ PRICE_CODE

const PRICE_CODE = 'base_price'

Price type identifier string

Definition at line 20 of file BasePrice.php.


The documentation for this class was generated from the following file: