public function PriceListItem::setPrice in Commerce Pricelist 8
Same name and namespace in other branches
- 8.2 src/Entity/PriceListItem.php \Drupal\commerce_pricelist\Entity\PriceListItem::setPrice()
Sets the price list item price.
Parameters
\Drupal\commerce_price\Price $price: The price.
Return value
$this
Overrides PriceListItemInterface::setPrice
File
- src/
Entity/ PriceListItem.php, line 150
Class
- PriceListItem
- Defines the price list item entity.
Namespace
Drupal\commerce_pricelist\EntityCode
public function setPrice(Price $price) {
return $this
->set('price', $price);
}