You are here

public static function FieldStorageDefinitionEventSubscriberTrait::getFieldStorageDefinitionEvents in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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
Returns an array of event names this subscriber wants to listen to.

File

core/lib/Drupal/Core/Field/FieldStorageDefinitionEventSubscriberTrait.php, line 29
Contains \Drupal\Core\Field\FieldStorageDefinitionEventSubscriberTrait.

Class

FieldStorageDefinitionEventSubscriberTrait
Helper methods for FieldStorageDefinitionListenerInterface.

Namespace

Drupal\Core\Field

Code

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