You are here

public function MigrateExecutable::onPostImport in Migrate Tools 8.5

Same name and namespace in other branches
  1. 8 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::onPostImport()
  2. 8.2 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::onPostImport()
  3. 8.3 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::onPostImport()
  4. 8.4 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::onPostImport()

React to migration completion.

Parameters

\Drupal\migrate\Event\MigrateImportEvent $event: The map event.

File

src/MigrateExecutable.php, line 238

Class

MigrateExecutable
Defines a migrate executable class for drush.

Namespace

Drupal\migrate_tools

Code

public function onPostImport(MigrateImportEvent $event) {
  $migrate_last_imported_store = \Drupal::keyValue('migrate_last_imported');
  $migrate_last_imported_store
    ->set($event
    ->getMigration()
    ->id(), round(\Drupal::time()
    ->getCurrentMicroTime() * 1000));
  $this
    ->progressMessage();
  $this
    ->removeListeners();
}