You are here

public function AdjustmentTransformer::processAdjustments in Commerce Core 8.2

Combines, sorts, and rounds the given adjustments.

Parameters

\Drupal\commerce_order\Adjustment[] $adjustments: The adjustments.

Return value

\Drupal\commerce_order\Adjustment[] The processed adjustments.

Overrides AdjustmentTransformerInterface::processAdjustments

File

modules/order/src/AdjustmentTransformer.php, line 40

Class

AdjustmentTransformer

Namespace

Drupal\commerce_order

Code

public function processAdjustments(array $adjustments) {
  $adjustments = $this
    ->combineAdjustments($adjustments);
  $adjustments = $this
    ->sortAdjustments($adjustments);
  $adjustments = $this
    ->roundAdjustments($adjustments);
  return $adjustments;
}