function system_sort_modules_by_info_name

Same name in other branches
  1. 7.x modules/system/system.admin.inc \system_sort_modules_by_info_name()
  2. 8.9.x core/modules/system/system.module \system_sort_modules_by_info_name()

Array sorting callback; sorts modules by their name.

Deprecated

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Extension\ExtensionList::sortByName() instead.

See also

https://www.drupal.org/node/3225999

1 string reference to 'system_sort_modules_by_info_name'
SystemDeprecationTest::testSystemSortModulesByInfoName in core/modules/system/tests/src/Kernel/SystemDeprecationTest.php

File

core/modules/system/system.module, line 909

Code

function system_sort_modules_by_info_name($a, $b) {
    @trigger_error('system_sort_modules_by_info_name() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal\\Core\\Extension\\ExtensionList::sortByName() instead. See https://www.drupal.org/node/3225999', E_USER_DEPRECATED);
    return strcasecmp($a->info['name'], $b->info['name']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.