public function OrderTotalSummaryInterface::buildTotals in Commerce Core 8.2
Builds the totals for the given order.
Parameters
\Drupal\commerce_order\Entity\OrderInterface $order: The order.
Return value
array An array of totals with the following elements:
- subtotal: The order subtotal price.
- adjustments: The adjustments:
- type: The adjustment type.
- label: The adjustment label.
- amount: The adjustment amount.
- percentage: The decimal adjustment percentage, when available.
- total: The order total price.
1 method overrides OrderTotalSummaryInterface::buildTotals()
- OrderTotalSummary::buildTotals in modules/
order/ src/ OrderTotalSummary.php - Builds the totals for the given order.
File
- modules/
order/ src/ OrderTotalSummaryInterface.php, line 25
Class
Namespace
Drupal\commerce_orderCode
public function buildTotals(OrderInterface $order);