public function ProductVariation::getListPrice in Commerce Core 8.2
Gets the list price.
Return value
\Drupal\commerce_price\Price The list price.
Overrides ProductVariationInterface::getListPrice
File
- modules/
product/ src/ Entity/ ProductVariation.php, line 189
Class
- ProductVariation
- Defines the product variation entity class.
Namespace
Drupal\commerce_product\EntityCode
public function getListPrice() {
if (!$this
->get('list_price')
->isEmpty()) {
return $this
->get('list_price')
->first()
->toPrice();
}
}