public function PriceCalculatorResult::__construct in Commerce Core 8.2
Constructs a new PriceCalculatorResult object.
Parameters
\Drupal\commerce_price\Price $calculated_price: The calculated price.
\Drupal\commerce_price\Price $base_price: The base price.
\Drupal\commerce_order\Adjustment[] $adjustments: The adjustments.
File
- modules/
order/ src/ PriceCalculatorResult.php, line 45
Class
- PriceCalculatorResult
- Represents the result of a price calculation.
Namespace
Drupal\commerce_orderCode
public function __construct(Price $calculated_price, Price $base_price, array $adjustments = []) {
$this->calculatedPrice = $calculated_price;
$this->basePrice = $base_price;
$this->adjustments = $adjustments;
}