You are here

function _migrate_ui_get_descendents in Migrate 7.2

Generate a list of all migrations dependent on a given migration.

Parameters

$migration_name:

array $all_dependencies:

Return value

array

1 call to _migrate_ui_get_descendents()
migrate_ui_edit_mappings in migrate_ui/migrate_ui.pages.inc
Page callback to edit field mappings for a given migration.

File

migrate_ui/migrate_ui.pages.inc, line 1310
Pages for managing migration processes.

Code

function _migrate_ui_get_descendents($migration_name, array $all_dependencies) {
  $descendents = array();
  foreach ($all_dependencies as $machine_name => $dependencies) {
    if (in_array($migration_name, $dependencies)) {
      $descendents[$machine_name] = $machine_name;
      $descendents += _migrate_ui_get_descendents($machine_name, $all_dependencies);
    }
  }
  return $descendents;
}