You are here

public static function MigrationSubscriber::getSubscribedEvents in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/EventSubscriber/MigrationSubscriber.php \Drupal\simplenews\EventSubscriber\MigrationSubscriber::getSubscribedEvents()
  2. 3.x src/EventSubscriber/MigrationSubscriber.php \Drupal\simplenews\EventSubscriber\MigrationSubscriber::getSubscribedEvents()

File

src/EventSubscriber/MigrationSubscriber.php, line 74

Class

MigrationSubscriber
Create a simplenews field on relevant content types.

Namespace

Drupal\simplenews\EventSubscriber

Code

public static function getSubscribedEvents() {
  $return = [];
  if (class_exists('\\Drupal\\migrate\\Event\\MigrateEvents')) {
    $return[MigrateEvents::POST_ROW_SAVE][] = 'onMigrationPostRowSave';
  }
  return $return;
}