function MigrationState::getDestinationsForSource
Same name in other branches
- 9 core/modules/migrate_drupal/src/MigrationState.php \Drupal\migrate_drupal\MigrationState::getDestinationsForSource()
- 8.9.x core/modules/migrate_drupal/src/MigrationState.php \Drupal\migrate_drupal\MigrationState::getDestinationsForSource()
- 11.x core/modules/migrate_drupal/src/MigrationState.php \Drupal\migrate_drupal\MigrationState::getDestinationsForSource()
Get net destinations for source module.
Parameters
string $version: Source version.
string $source_module: Source module.
Return value
array Destination modules either declared by {modulename}.migrate_drupal.yml files or discovered from migration plugins.
2 calls to MigrationState::getDestinationsForSource()
- MigrationState::buildUpgradeState in core/
modules/ migrate_drupal/ src/ MigrationState.php - Determines migration state for each source module enabled on the source.
- MigrationState::getSourceState in core/
modules/ migrate_drupal/ src/ MigrationState.php - Tests if a destination exists for the given source module.
File
-
core/
modules/ migrate_drupal/ src/ MigrationState.php, line 445
Class
- MigrationState
- Determines the migrate state for all modules enabled on the source.
Namespace
Drupal\migrate_drupalCode
protected function getDestinationsForSource($version, $source_module) {
if (!isset($this->destinations[$version][$source_module])) {
$this->discoveredBySource[$version] += [
$source_module => [],
];
$this->declaredBySource[$version] += [
$source_module => [],
];
$destination = array_unique(array_merge($this->discoveredBySource[$version][$source_module], $this->declaredBySource[$version][$source_module]));
sort($destination);
$this->destinations[$version][$source_module] = $destination;
}
return $this->destinations[$version][$source_module];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.