public function Price::isNegative in Price 2.0.x
Same name and namespace in other branches
- 2.x src/Price.php \Drupal\price\Price::isNegative()
Gets whether the current price is negative.
Return value
bool TRUE if the price is negative, FALSE otherwise.
File
- src/
Price.php, line 203
Class
- Price
- Provides a value object for monetary values.
Namespace
Drupal\priceCode
public function isNegative() : bool {
return Calculator::compare($this->number, '0') == -1;
}