You are here

public function Price::greaterThanOrEqual in Price 8

Same name and namespace in other branches
  1. 3.x src/Price.php \Drupal\price\Price::greaterThanOrEqual()
  2. 2.0.x src/Price.php \Drupal\price\Price::greaterThanOrEqual()
  3. 2.x src/Price.php \Drupal\price\Price::greaterThanOrEqual()
  4. 3.0.x src/Price.php \Drupal\price\Price::greaterThanOrEqual()

Gets whether the current price is greater than or equal to the given price.

Parameters

\Drupal\price\Price $price: The price.

Return value

bool TRUE if the current price is greater than or equal to the given price, FALSE otherwise.

File

src/Price.php, line 219

Class

Price
Provides a value object for monetary values.

Namespace

Drupal\price

Code

public function greaterThanOrEqual(Price $price) {
  return $this
    ->greaterThan($price) || $this
    ->equals($price);
}