You are here

public static function FieldStorageDefinitionEventSubscriberTrait::getFieldStorageDefinitionEvents in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Field/FieldStorageDefinitionEventSubscriberTrait.php \Drupal\Core\Field\FieldStorageDefinitionEventSubscriberTrait::getFieldStorageDefinitionEvents()

Returns the subscribed events.

Return value

array An array of subscribed event names.

See also

\Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()

1 call to FieldStorageDefinitionEventSubscriberTrait::getFieldStorageDefinitionEvents()
EntityTestDefinitionSubscriber::getSubscribedEvents in core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php

File

core/lib/Drupal/Core/Field/FieldStorageDefinitionEventSubscriberTrait.php, line 24

Class

FieldStorageDefinitionEventSubscriberTrait
Helper methods for FieldStorageDefinitionListenerInterface.

Namespace

Drupal\Core\Field

Code

public static function getFieldStorageDefinitionEvents() {
  $event = [
    'onFieldStorageDefinitionEvent',
    100,
  ];
  $events[FieldStorageDefinitionEvents::CREATE][] = $event;
  $events[FieldStorageDefinitionEvents::UPDATE][] = $event;
  $events[FieldStorageDefinitionEvents::DELETE][] = $event;
  return $events;
}