1 system.module | system_config_update(Config $staging_config, Config $active_config) |
Implements hook_config_update().
File
- core/
modules/ system/ system.module, line 3399 - Configuration system that lets administrators modify the workings of the site.
Code
function system_config_update(Config $staging_config, Config $active_config) {
$config_name = $staging_config->getName();
// Enable modules and themes on config update. Note that the disabling and
// uninstalling of extensions is not supported through config. They must be
// disabled through the UI.
if ($config_name === 'system.extensions') {
foreach (array('modules', 'themes') as $extension_type) {
$staging_list = array_filter($staging_config->get($extension_type));
$current_list = array_filter($active_config->get($extension_type));
$added_list = array_keys(array_diff_key($staging_list, $current_list));
if ($extension_type === 'modules') {
module_enable($added_list);
}
else {
theme_enable($added_list);
}
}
}
}