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