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