public function PriceModified::lessThan in Price 8
Same name and namespace in other branches
- 3.x src/PriceModified.php \Drupal\price\PriceModified::lessThan()
- 3.0.x src/PriceModified.php \Drupal\price\PriceModified::lessThan()
Gets whether the current price is lesser than the given price.
Parameters
\Drupal\price\PriceModified $price: The price.
Return value
bool TRUE if the current price is lesser than the given price, FALSE otherwise.
1 call to PriceModified::lessThan()
- PriceModified::lessThanOrEqual in src/PriceModified.php 
- Gets whether the current price is lesser than or equal to the given price.
File
- src/PriceModified.php, line 251 
Class
- PriceModified
- Provides a value object for monetary values.
Namespace
Drupal\priceCode
public function lessThan(PriceModified $price) {
  return $this
    ->compareTo($price) == -1;
}