You are here

public function Subscription::hasPurchasedEntity in Commerce Recurring Framework 8

Gets whether the subscription has a purchased entity.

Return value

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

Overrides SubscriptionInterface::hasPurchasedEntity

File

src/Entity/Subscription.php, line 200

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

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