function PluginEventSubscriber::getSubscribedEvents

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/PluginEventSubscriber.php \Drupal\migrate\Plugin\PluginEventSubscriber::getSubscribedEvents()
  2. 8.9.x core/modules/migrate/src/Plugin/PluginEventSubscriber.php \Drupal\migrate\Plugin\PluginEventSubscriber::getSubscribedEvents()
  3. 11.x core/modules/migrate/src/Plugin/PluginEventSubscriber.php \Drupal\migrate\Plugin\PluginEventSubscriber::getSubscribedEvents()

File

core/modules/migrate/src/Plugin/PluginEventSubscriber.php, line 84

Class

PluginEventSubscriber
Event subscriber to forward Migrate events to source and destination plugins.

Namespace

Drupal\migrate\Plugin

Code

public static function getSubscribedEvents() : array {
  $events = [];
  $events[MigrateEvents::PRE_IMPORT][] = [
    'preImport',
  ];
  $events[MigrateEvents::POST_IMPORT][] = [
    'postImport',
  ];
  $events[MigrateEvents::PRE_ROLLBACK][] = [
    'preRollback',
  ];
  $events[MigrateEvents::POST_ROLLBACK][] = [
    'postRollback',
  ];
  return $events;
}

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