You are here

public function Subscription::getType in Commerce Recurring Framework 8

Gets the subscription type.

Return value

\Drupal\commerce_recurring\Plugin\Commerce\SubscriptionType\SubscriptionTypeInterface The subscription type.

Overrides SubscriptionInterface::getType

File

src/Entity/Subscription.php, line 103

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

public function getType() {
  $subscription_type_manager = \Drupal::service('plugin.manager.commerce_subscription_type');
  return $subscription_type_manager
    ->createInstance($this
    ->bundle());
}