function countries_sort in Countries 8
Same name and namespace in other branches
- 7.2 countries.module \countries_sort()
A helper uasort callback function to sort an array of countries or names.
5 string references to 'countries_sort'
- CountriesFunctionsUnitTest::testCountriesSort in tests/
countries.test - This test that the country sort works.
- countries_get_continents in ./
countries.module - Gets a list of all continents currently enabled.
- countries_get_countries in ./
countries.module - Helper function to load countries. This includes all countries by default.
- countries_import_cldr::importSettingsForm in modules/
countries_import/ plugins/ countries_import_cldr.inc - views_handler_filter_countries_list::get_value_options in views/
views_handler_filter_countries_list.inc
File
- ./
countries.module, line 627 - Defines the field and entity information for countries.
Code
function countries_sort($a, $b) {
$a = countries_transliterate(is_object($a) ? $a->name : $a);
$b = countries_transliterate(is_object($b) ? $b->name : $b);
return strnatcasecmp($a, $b);
}