public function OrderInterface::collectAdjustments in Commerce Core 8.2
Collects all adjustments that belong to the order.
Unlike getAdjustments() which returns only order adjustments, this method returns both order and order item adjustments.
Important: The returned adjustments are unprocessed, and must be processed before use.
Parameters
string[] $adjustment_types: The adjustment types to include. Examples: fee, promotion, tax. Defaults to all adjustment types.
Return value
\Drupal\commerce_order\Adjustment[] The adjustments.
See also
\Drupal\commerce_order\AdjustmentTransformerInterface::processAdjustments()
1 method overrides OrderInterface::collectAdjustments()
- Order::collectAdjustments in modules/
order/ src/ Entity/ Order.php - Collects all adjustments that belong to the order.
File
- modules/
order/ src/ Entity/ OrderInterface.php, line 247
Class
- OrderInterface
- Defines the interface for orders.
Namespace
Drupal\commerce_order\EntityCode
public function collectAdjustments(array $adjustment_types = []);