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