public function Migration::interruptMigration in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::interruptMigration()
- 9 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::interruptMigration()
Signal that the migration should be interrupted with the specified result code.
Parameters
int $result: One of the MigrationInterface::RESULT_* constants.
Overrides MigrationInterface::interruptMigration
File
- core/
modules/ migrate/ src/ Plugin/ Migration.php, line 590
Class
- Migration
- Defines the Migration plugin.
Namespace
Drupal\migrate\PluginCode
public function interruptMigration($result) {
$this
->setStatus(MigrationInterface::STATUS_STOPPING);
\Drupal::keyValue('migrate_interruption_result')
->set($this
->id(), $result);
}