You are here

public function Order::getItems in Commerce Core 8.2

Gets the order items.

Return value

\Drupal\commerce_order\Entity\OrderItemInterface[] The order items.

Overrides OrderInterface::getItems

5 calls to Order::getItems()
Order::clearAdjustments in modules/order/src/Entity/Order.php
Removes all adjustments that belong to the order.
Order::collectAdjustments in modules/order/src/Entity/Order.php
Collects all adjustments that belong to the order.
Order::getSubtotalPrice in modules/order/src/Entity/Order.php
Gets the order subtotal price.
Order::postSave in modules/order/src/Entity/Order.php
Acts on a saved entity before the insert or update hook is invoked.
Order::recalculateTotalPrice in modules/order/src/Entity/Order.php
Recalculates the order total price.

File

modules/order/src/Entity/Order.php, line 259

Class

Order
Defines the order entity class.

Namespace

Drupal\commerce_order\Entity

Code

public function getItems() {
  return $this
    ->get('order_items')
    ->referencedEntities();
}