You are here

public function Migration::interruptMigration in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Entity/Migration.php \Drupal\migrate\Entity\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/Entity/Migration.php, line 456
Contains \Drupal\migrate\Entity\Migration.

Class

Migration
Defines the Migration entity.

Namespace

Drupal\migrate\Entity

Code

public function interruptMigration($result) {
  $this
    ->setStatus(MigrationInterface::STATUS_STOPPING);
  \Drupal::keyValue('migrate_interruption_result')
    ->set($this
    ->id(), $result);
}