You are here

public function ReferenceablePluginTypesSubscriber::onPluginTypes in Commerce Recurring Framework 8

Registers the 'commerce_subscription_type' plugin type as referenceable.

Parameters

\Drupal\commerce\Event\ReferenceablePluginTypesEvent $event: The event.

File

src/EventSubscriber/ReferenceablePluginTypesSubscriber.php, line 28

Class

ReferenceablePluginTypesSubscriber

Namespace

Drupal\commerce_recurring\EventSubscriber

Code

public function onPluginTypes(ReferenceablePluginTypesEvent $event) {
  $types = $event
    ->getPluginTypes();
  $types['commerce_subscription_type'] = $this
    ->t('Subscription type');
  $types['commerce_prorater'] = $this
    ->t('Prorater');
  $event
    ->setPluginTypes($types);
}