You are here

protected function MigrationState::getMigrationStates in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/src/MigrationState.php \Drupal\migrate_drupal\MigrationState::getMigrationStates()
  2. 9 core/modules/migrate_drupal/src/MigrationState.php \Drupal\migrate_drupal\MigrationState::getMigrationStates()

Gets migration state information from *.migrate_drupal.yml.

Return value

array An association array keyed by module of the finished and not_finished migrations for each module.

File

core/modules/migrate_drupal/src/MigrationState.php, line 254

Class

MigrationState
Determines the migrate state for all modules enabled on the source.

Namespace

Drupal\migrate_drupal

Code

protected function getMigrationStates() {

  // Always instantiate a new YamlDiscovery object so that we always search on
  // the up-to-date list of modules.
  $discovery = new YamlDiscovery('migrate_drupal', array_map(function ($value) {
    return $value . '/migrations/state';
  }, $this->moduleHandler
    ->getModuleDirectories()));
  return $discovery
    ->findAll();
}