You are here

public function SubscriptionStorageInterface::createFromOrderItem in Commerce Recurring Framework 8

Constructs a new subscription using the given order item.

The new subscription isn't saved.

Parameters

\Drupal\commerce_order\Entity\OrderItemInterface $order_item: The order item.

array $values: (optional) An array of values to set, keyed by property name.

Return value

\Drupal\commerce_recurring\Entity\SubscriptionInterface The created subscription.

1 method overrides SubscriptionStorageInterface::createFromOrderItem()
SubscriptionStorage::createFromOrderItem in src/SubscriptionStorage.php
Constructs a new subscription using the given order item.

File

src/SubscriptionStorageInterface.php, line 26

Class

SubscriptionStorageInterface
Defines the interface for subscription storage.

Namespace

Drupal\commerce_recurring

Code

public function createFromOrderItem(OrderItemInterface $order_item, array $values = []);