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