function FieldStorageDefinitionEventSubscriberTrait::getFieldStorageDefinitionEvents

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/FieldStorageDefinitionEventSubscriberTrait.php \Drupal\Core\Field\FieldStorageDefinitionEventSubscriberTrait::getFieldStorageDefinitionEvents()
  2. 10 core/lib/Drupal/Core/Field/FieldStorageDefinitionEventSubscriberTrait.php \Drupal\Core\Field\FieldStorageDefinitionEventSubscriberTrait::getFieldStorageDefinitionEvents()
  3. 11.x 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.