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