public function PriceModified::divide in Price 3.x
Same name and namespace in other branches
- 8 src/PriceModified.php \Drupal\price\PriceModified::divide()
- 3.0.x src/PriceModified.php \Drupal\price\PriceModified::divide()
Divides the current price by the given number.
Parameters
string $number: The number.
Return value
static The resulting price.
File
- src/
PriceModified.php, line 171
Class
- PriceModified
- Provides a value object for monetary values.
Namespace
Drupal\priceCode
public function divide($number) {
$new_number = Calculator::divide($this->number, $number);
return new static($new_number, $this->currencyCode, $this->modifier);
}