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