You are here

public function OrderItem::hasPurchasedEntity in Commerce Core 8.2

Gets whether the order item has a purchased entity.

Return value

bool TRUE if the order item has a purchased entity, FALSE otherwise.

Overrides OrderItemInterface::hasPurchasedEntity

File

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

Class

OrderItem
Defines the order item entity class.

Namespace

Drupal\commerce_order\Entity

Code

public function hasPurchasedEntity() {
  return !$this
    ->get('purchased_entity')
    ->isEmpty();
}