You are here

interface OrderTotalSummaryInterface in Commerce Core 8.2

Hierarchy

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_order
View 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

Namesort descending Modifiers Type Description Overrides
OrderTotalSummaryInterface::buildTotals public function Builds the totals for the given order. 1