You are here

protected static function ConfigUpdateController::sortLinks in Configuration Update Manager 8

Compares links for uasort(), to sort by displayed link title.

File

config_update_ui/src/Controller/ConfigUpdateController.php, line 625

Class

ConfigUpdateController
Returns responses for Configuration Revert module operations.

Namespace

Drupal\config_update_ui\Controller

Code

protected static function sortLinks($link1, $link2) {
  $title1 = $link1['title'];
  $title2 = $link2['title'];
  if ($title1 == $title2) {
    return 0;
  }
  return $title1 < $title2 ? -1 : 1;
}