You are here

public static function MigrateUpgradeImportBatch::onPostRowDelete in Drupal 10

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

Reacts to item deletion.

Parameters

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

File

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

Class

MigrateUpgradeImportBatch
Runs a single migration batch.

Namespace

Drupal\migrate_drupal_ui\Batch

Code

public static function onPostRowDelete(MigrateRowDeleteEvent $event) {

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