/** * {@inheritdoc} */ public static function createFromPurchasableEntity(PurchasableEntityInterface $entity) { $values = [ 'type' => $entity->getLineItemType(), 'title' => $entity->getLineItemTitle(), 'purchased_entity' => $entity, ]; return self::create($values); }