You are here

public function Price::greaterThanOrEqual in Commerce Core 8.2

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

Parameters

\Drupal\commerce_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

modules/price/src/Price.php, line 254

Class

Price
Provides a value object for monetary values.

Namespace

Drupal\commerce_price

Code

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