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