You are here

public function OrderItem::getPurchasedEntityId in Commerce Core 8.2

Gets the purchased entity ID.

Return value

int The purchased entity ID.

Overrides OrderItemInterface::getPurchasedEntityId

File

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

Class

OrderItem
Defines the order item entity class.

Namespace

Drupal\commerce_order\Entity

Code

public function getPurchasedEntityId() {
  return $this
    ->get('purchased_entity')->target_id;
}