You are here

public static function Configuration::getDependentModules in Configuration Management 7.2

Determine the status of the given module and of its dependencies.

2 calls to Configuration::getDependentModules()
Configuration::getRequiredModules in lib/Drupal/configuration/Config/Configuration.php
Returns a list of modules that are required to run this configuration.
ConfigurationManagement::discoverRequiredModules in lib/Drupal/configuration/Config/ConfigurationManagement.php
Returns a list of modules required to import the configurations indicated in $list.

File

lib/Drupal/configuration/Config/Configuration.php, line 741
Definition of Drupal\configuration\Config\Configuration.

Class

Configuration

Namespace

Drupal\configuration\Config

Code

public static function getDependentModules($module, &$stack) {
  $available_modules = static::getAvailableModules();
  if (!isset($available_modules[$module])) {
    $stack[$module] = Configuration::moduleMissing;
    return;
  }
  else {
    if (empty($available_modules[$module]->status)) {
      $stack[$module] = Configuration::moduleToInstall;
      foreach ($available_modules[$module]->requires as $required_module) {
        if (empty($stack[$required_module['name']])) {
          static::getDependentModules($required_module['name'], $stack);
        }
      }
    }
    else {
      $stack[$module] = Configuration::moduleInstalled;
    }
  }
}