protected static ConfigDependencyManager::sortGraphByWeight(array $a, array $b)
Sorts the dependency graph by weight and alphabetically.
array $a: First item for comparison. The compared items should be associative arrays that include a 'weight' and a 'name' key.
array $b: Second item for comparison.
int The comparison result for uasort().
protected static function sortGraphByWeight(array $a, array $b) { $weight_cmp = SortArray::sortByKeyInt($a, $b, 'weight'); if ($weight_cmp === 0) { return SortArray::sortByKeyString($a, $b, 'name'); } return $weight_cmp; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!ConfigDependencyManager.php/function/ConfigDependencyManager::sortGraphByWeight/8.1.x