function Migration::getMigrationDependencies
Same name in other branches
- 9 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::getMigrationDependencies()
- 10 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::getMigrationDependencies()
- 11.x core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::getMigrationDependencies()
Overrides MigrationInterface::getMigrationDependencies
1 method overrides Migration::getMigrationDependencies()
- TestMigrationMock::getMigrationDependencies in core/
modules/ migrate/ tests/ src/ Unit/ MigrationPluginManagerTest.php - Get the dependencies for this migration.
File
-
core/
modules/ migrate/ src/ Plugin/ Migration.php, line 624
Class
- Migration
- Defines the Migration plugin.
Namespace
Drupal\migrate\PluginCode
public function getMigrationDependencies() {
$this->migration_dependencies = ($this->migration_dependencies ?: []) + [
'required' => [],
'optional' => [],
];
if (count($this->migration_dependencies) !== 2 || !is_array($this->migration_dependencies['required']) || !is_array($this->migration_dependencies['optional'])) {
throw new InvalidPluginDefinitionException($this->id(), "Invalid migration dependencies configuration for migration {$this->id()}");
}
$this->migration_dependencies['optional'] = array_unique(array_merge($this->migration_dependencies['optional'], $this->findMigrationDependencies($this->process)));
return $this->migration_dependencies;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.