public function PriceListItem::getListPrice in Commerce Pricelist 8.2
Gets the list price.
Return value
\Drupal\commerce_price\Price The list price.
Overrides PriceListItemInterface::getListPrice
File
- src/
Entity/ PriceListItem.php, line 160
Class
- PriceListItem
- Defines the price list item entity.
Namespace
Drupal\commerce_pricelist\EntityCode
public function getListPrice() {
if (!$this
->get('list_price')
->isEmpty()) {
return $this
->get('list_price')
->first()
->toPrice();
}
}