You are here

public function OrderItem::getOrder in Commerce Core 8.2

Gets the parent order.

Return value

\Drupal\commerce_order\Entity\OrderInterface|null The order, or NULL.

Overrides OrderItemInterface::getOrder

2 calls to OrderItem::getOrder()
OrderItem::addAdjustment in modules/order/src/Entity/OrderItem.php
Adds an adjustment.
OrderItem::removeAdjustment in modules/order/src/Entity/OrderItem.php
Removes an adjustment.

File

modules/order/src/Entity/OrderItem.php, line 56

Class

OrderItem
Defines the order item entity class.

Namespace

Drupal\commerce_order\Entity

Code

public function getOrder() {
  return $this
    ->get('order_id')->entity;
}