public function ReferenceablePluginTypesSubscriber::onPluginTypes in Recurring Time Period 8
Registers our plugin types as referenceable.
Parameters
\Drupal\commerce\Event\ReferenceablePluginTypesEvent $event: The event.
File
- src/
EventSubscriber/ ReferenceablePluginTypesSubscriber.php, line 44
Class
- ReferenceablePluginTypesSubscriber
- Registers our plugin type as refereceable by Commerce's plugin field.
Namespace
Drupal\recurring_period\EventSubscriberCode
public function onPluginTypes(ReferenceablePluginTypesEvent $event) {
$plugin_types = $event
->getPluginTypes();
$plugin_types['recurring_period'] = $this
->t('Recurring period');
$event
->setPluginTypes($plugin_types);
}