You are here

public function SubscriptionTypeBase::getPurchasableEntityTypeId in Commerce Recurring Framework 8

Gets the subscription type's purchasable entity type ID.

E.g, if subscriptions of this type are used for subscribing to product variations, the ID will be 'commerce_product_variation'.

Return value

string The purchasable entity type ID, or NULL if the subscription isn't backed by a purchasable entity.

Overrides SubscriptionTypeInterface::getPurchasableEntityTypeId

File

src/Plugin/Commerce/SubscriptionType/SubscriptionTypeBase.php, line 75

Class

SubscriptionTypeBase
Defines the subscription base class.

Namespace

Drupal\commerce_recurring\Plugin\Commerce\SubscriptionType

Code

public function getPurchasableEntityTypeId() {
  if (!empty($this->pluginDefinition['purchasable_entity_type'])) {
    return $this->pluginDefinition['purchasable_entity_type'];
  }
}