public function LicenseStorageInterface::createFromOrderItem in Commerce License 8.2
Creates a new license from an order item.
Parameters
\Drupal\commerce_order\Entity\OrderItemInterface $order_item: The order item. Values for the license will be taken from the order item's customer and the purchased entity's license_type and license_expiration fields.
Return value
\Drupal\commerce_license\Entity\LicenseInterface A new, unsaved license entity, whose state is 'new'.
1 method overrides LicenseStorageInterface::createFromOrderItem()
- LicenseStorage::createFromOrderItem in src/
LicenseStorage.php - Creates a new license from an order item.
File
- src/
LicenseStorageInterface.php, line 30
Class
- LicenseStorageInterface
- Defines the storage handler class for License entities.
Namespace
Drupal\commerce_licenseCode
public function createFromOrderItem(OrderItemInterface $order_item);