function MigrationState::getMigrationStates

Same name in other branches
  1. 8.9.x core/modules/migrate_drupal/src/MigrationState.php \Drupal\migrate_drupal\MigrationState::getMigrationStates()
  2. 10 core/modules/migrate_drupal/src/MigrationState.php \Drupal\migrate_drupal\MigrationState::getMigrationStates()
  3. 11.x 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.

1 call to MigrationState::getMigrationStates()
MigrationState::buildDeclaredStateBySource in core/modules/migrate_drupal/src/MigrationState.php
Gets migration data from *.migrate_drupal.yml sorted by source 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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.