You are here

public function Migration::setStatus in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::setStatus()
  2. 9 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::setStatus()

Set the current migration status.

Parameters

int $status: One of the STATUS_* constants.

Overrides MigrationInterface::setStatus

1 call to Migration::setStatus()
Migration::interruptMigration in core/modules/migrate/src/Plugin/Migration.php
Signal that the migration should be interrupted with the specified result code.

File

core/modules/migrate/src/Plugin/Migration.php, line 549

Class

Migration
Defines the Migration plugin.

Namespace

Drupal\migrate\Plugin

Code

public function setStatus($status) {
  \Drupal::keyValue('migrate_status')
    ->set($this
    ->id(), $status);
}