You are here

public function Subscription::getPurchasedEntity in Commerce Recurring Framework 8

Gets the purchased entity.

Return value

\Drupal\commerce\PurchasableEntityInterface|null The purchased entity, or NULL.

Overrides SubscriptionInterface::getPurchasedEntity

File

src/Entity/Subscription.php, line 207

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

public function getPurchasedEntity() {
  return $this
    ->get('purchased_entity')->entity;
}