function module_config_sort
Same name and namespace in other branches
- 11.x core/includes/module.inc \module_config_sort()
- 10 core/includes/module.inc \module_config_sort()
- 9 core/includes/module.inc \module_config_sort()
- 8.9.x core/includes/module.inc \module_config_sort()
Sorts the configured list of enabled modules.
The list of enabled modules is expected to be ordered by weight and name. The list is always sorted on write to avoid the overhead on read.
Parameters
array $data: An array of module configuration data.
Return value
array An array of module configuration data sorted by weight and name.
Deprecated
in drupal:11.5.0 and is removed from drupal:13.0.0. Use \Drupal::service(ModuleWeight::class)->sort() instead.
See also
https://www.drupal.org/node/3595653
1 call to module_config_sort()
- InstallerExistingConfigTestBase::prepareEnvironment in core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerExistingConfigTestBase.php - Prepares the current environment for running the test.
File
-
core/
includes/ module.inc, line 47
Code
function module_config_sort($data) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. Use \\Drupal::service(ModuleWeight::class)->sort() instead. See https://www.drupal.org/node/3595653', E_USER_DEPRECATED);
return \Drupal::service(ModuleWeight::class)->sort($data);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.