interface OrderTotalSummaryInterface in Commerce Core 8.2
Hierarchy
- interface \Drupal\commerce_order\OrderTotalSummaryInterface
Expanded class hierarchy of OrderTotalSummaryInterface
All classes that implement OrderTotalSummaryInterface
3 files declare their use of OrderTotalSummaryInterface
- OrderReceiptMail.php in modules/
order/ src/ Mail/ OrderReceiptMail.php - OrderRenderer.php in modules/
order/ src/ EntityPrint/ OrderRenderer.php - OrderTotalSummary.php in modules/
order/ src/ Plugin/ Field/ FieldFormatter/ OrderTotalSummary.php
File
- modules/
order/ src/ OrderTotalSummaryInterface.php, line 7
Namespace
Drupal\commerce_orderView source
interface OrderTotalSummaryInterface {
/**
* Builds the totals for the given order.
*
* @param \Drupal\commerce_order\Entity\OrderInterface $order
* The order.
*
* @return 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.
*/
public function buildTotals(OrderInterface $order);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OrderTotalSummaryInterface:: |
public | function | Builds the totals for the given order. | 1 |