You are here

public static function MigrateUpgradeImportBatch::onPostRowSave in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php \Drupal\migrate_drupal_ui\Batch\MigrateUpgradeImportBatch::onPostRowSave()

Reacts to item import.

Parameters

\Drupal\migrate\Event\MigratePostRowSaveEvent $event: The post-save event.

File

core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php, line 287

Class

MigrateUpgradeImportBatch
Runs a single migration batch.

Namespace

Drupal\migrate_drupal_ui\Batch

Code

public static function onPostRowSave(MigratePostRowSaveEvent $event) {

  // We want to interrupt this batch and start a fresh one.
  if (time() - REQUEST_TIME > static::$maxExecTime) {
    $event
      ->getMigration()
      ->interruptMigration(MigrationInterface::RESULT_INCOMPLETE);
  }
}