function drush_module_dependents

8.0.x environment_7.inc drush_module_dependents($modules, $module_info)
8.0.x environment_6.inc drush_module_dependents($modules, $module_info)
8.0.x environment.inc drush_module_dependents($modules, $module_info)
6.x environment_6.inc drush_module_dependents($modules, $module_info)
6.x environment.inc drush_module_dependents($modules, $module_info)
6.x environment_7.inc drush_module_dependents($modules, $module_info)
7.x environment_7.inc drush_module_dependents($modules, $module_info)
7.x environment_6.inc drush_module_dependents($modules, $module_info)
7.x environment.inc drush_module_dependents($modules, $module_info)
3.x environment_7.inc drush_module_dependents($modules, $module_info)
3.x environment_6.inc drush_module_dependents($modules, $module_info)
3.x environment_5.inc drush_module_dependents($modules, $module_info)
4.x environment_6.inc drush_module_dependents($modules, $module_info)
4.x environment_5.inc drush_module_dependents($modules, $module_info)
4.x environment.inc drush_module_dependents($modules, $module_info)
5.x environment_6.inc drush_module_dependents($modules, $module_info)
5.x environment.inc drush_module_dependents($modules, $module_info)
master environment_7.inc drush_module_dependents($modules, $module_info)
master environment.inc drush_module_dependents($modules, $module_info)

Return dependents of modules.

Parameters

$modules: Array of module names

$module_info: Drupal 'files' array for modules as returned by drush_get_modules().

Return value

Array with dependents for each one of $modules

2 calls to drush_module_dependents()
drush_pm_disable in commands/pm/pm.drush.inc
Command callback. Disable one or more extensions.
drush_pm_uninstall in commands/pm/pm.drush.inc
Command callback. Uninstall one or more modules. // TODO: Use drupal_execute on system_modules_uninstall_confirm_form so that input is validated.

File

commands/core/drupal/environment.inc, line 96
Specific functions for a drupal 7 environment. drush_include_engine() magically includes either this file or environment_X.inc depending on which version of drupal drush is called from.

Code

function drush_module_dependents($modules, $module_info) {
  $dependents = array();
  foreach ($modules as $module) {
    $dependents = array_merge($dependents, drupal_map_assoc(array_keys($module_info[$module]->required_by)));
  }

  return array_unique($dependents);
}