You are here

public function Subscription::setPurchasedEntity in Commerce Recurring Framework 8

Sets the purchased entity.

Parameters

\Drupal\commerce\PurchasableEntityInterface $purchased_entity: The purchased entity.

Return value

$this

Overrides SubscriptionInterface::setPurchasedEntity

File

src/Entity/Subscription.php, line 221

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

public function setPurchasedEntity(PurchasableEntityInterface $purchased_entity) {
  $this
    ->set('purchased_entity', $purchased_entity);
  return $this;
}