You are here

public static function MigrationDrushCommandProgress::getSubscribedEvents in Migrate Tools 8.5

Same name and namespace in other branches
  1. 8.4 src/EventSubscriber/MigrationDrushCommandProgress.php \Drupal\migrate_tools\EventSubscriber\MigrationDrushCommandProgress::getSubscribedEvents()

File

src/EventSubscriber/MigrationDrushCommandProgress.php, line 44

Class

MigrationDrushCommandProgress
Import and rollback progress bar.

Namespace

Drupal\migrate_tools\EventSubscriber

Code

public static function getSubscribedEvents() {
  $events = [];
  $events[MigrateEvents::POST_ROW_SAVE][] = [
    'updateProgressBar',
    -10,
  ];
  $events[MigrateEvents::MAP_DELETE][] = [
    'updateProgressBar',
    -10,
  ];
  $events[MigrateEvents::POST_IMPORT][] = [
    'clearProgress',
    10,
  ];
  $events[MigrateEvents::POST_ROLLBACK][] = [
    'clearProgress',
    10,
  ];
  return $events;
}