arsort($module_list);
$module_list =
array_keys($module_list);
} // Required for module installation checks.
include_once $this->root . '/core/includes/install.inc';
/** @var \Drupal\Core\Config\ConfigInstaller $config_installer */
$config_installer = \Drupal::
service('config.installer'
);
$sync_status =
$config_installer->
isSyncing();
if ($sync_status) { $source_storage =
$config_installer->
getSourceStorage();
} $modules_installed =
[];
foreach ($module_list as $module) { $enabled =
$extension_config->
get("module.
$module"
) !== NULL;
if (!
$enabled) { // Throw an exception if the module name is too long.
if (strlen($module) > DRUPAL_EXTENSION_NAME_MAX_LENGTH
) { throw new ExtensionNameLengthException("Module name '
$module' is over the maximum allowed length of " . DRUPAL_EXTENSION_NAME_MAX_LENGTH . ' characters'
);
} // Load a new config object for each iteration, otherwise changes made