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

3 calls to drush_module_dependents()
_drush_pm_disable in commands/core/drupal/pm.inc
Command callback. Disable one or more extensions.
_drush_pm_uninstall in commands/core/drupal/pm_8.inc
Command callback. Uninstall one or more extensions.
_drush_pm_uninstall in commands/core/drupal/pm.inc
Command callback. Uninstall one or more modules.

File

commands/core/drupal/environment.inc, line 102
Specific functions for a drupal 8+ 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) {
    $keys = array_keys($module_info[$module]->required_by);
    $dependents = array_merge($dependents, array_combine($keys, $keys));
  }

  return array_unique($dependents);
}