public function Price::lessThanOrEqual in Price 8
Same name and namespace in other branches
- 3.x src/Price.php \Drupal\price\Price::lessThanOrEqual()
- 2.0.x src/Price.php \Drupal\price\Price::lessThanOrEqual()
- 2.x src/Price.php \Drupal\price\Price::lessThanOrEqual()
- 3.0.x src/Price.php \Drupal\price\Price::lessThanOrEqual()
Gets whether the current price is lesser than or equal to the given price.
Parameters
\Drupal\price\Price $price: The price.
Return value
bool TRUE if the current price is lesser than or equal to the given price, FALSE otherwise.
File
- src/
Price.php, line 247
Class
- Price
- Provides a value object for monetary values.
Namespace
Drupal\priceCode
public function lessThanOrEqual(Price $price) {
return $this
->lessThan($price) || $this
->equals($price);
}