You are here

public function ReferenceablePluginTypesSubscriber::onPluginTypes in Commerce Core 8.2

Registers the 'commerce_payment_method_type' plugin type as referenceable.

Needed by PluginSelectTest.

Parameters

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

File

tests/modules/commerce_test/src/EventSubscriber/ReferenceablePluginTypesSubscriber.php, line 30

Class

ReferenceablePluginTypesSubscriber

Namespace

Drupal\commerce_test\EventSubscriber

Code

public function onPluginTypes(ReferenceablePluginTypesEvent $event) {
  $types = $event
    ->getPluginTypes();
  $types['commerce_payment_method_type'] = $this
    ->t('Payment method type');
  $event
    ->setPluginTypes($types);
}