function migrate_order_dependencies in Migrate 7.2
Do a topological sort on our dependencies graph.
2 calls to migrate_order_dependencies()
- MigrateGroup::groups in includes/
group.inc - migrate_migrations in ./
migrate.module - Retrieve a list of all active migrations, ordered by dependencies. To be recognized, a class must be non-abstract, and derived from MigrationBase.
File
- ./
migrate.module, line 406 - API and drush commands to support migration of data from external sources into a Drupal installation.
Code
function migrate_order_dependencies($dependencies) {
$visited = array();
$list = array();
foreach (array_keys($dependencies) as $name) {
$visited[$name] = FALSE;
}
foreach (array_keys($dependencies) as $name) {
migrate_visit_dependent($dependencies, $name, $list, $visited);
}
return $list;
}