You are here

public function ReferenceablePluginTypesSubscriber::onPluginTypes in Commerce License 8.2

Registers our plugin types as referenceable.

Parameters

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

File

src/EventSubscriber/ReferenceablePluginTypesSubscriber.php, line 34

Class

ReferenceablePluginTypesSubscriber
Class ReferenceablePluginTypesSubscriber.

Namespace

Drupal\commerce_license\EventSubscriber

Code

public function onPluginTypes(ReferenceablePluginTypesEvent $event) {
  $plugin_types = $event
    ->getPluginTypes();
  $plugin_types['commerce_license_type'] = $this
    ->t('License type');
  $event
    ->setPluginTypes($plugin_types);
}