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