You are here

function LoggerController::sortTop in MongoDB 8

usort() helper function to sort top entries returned from a group query.

Parameters

array $x:

array $y:

Return value

boolean

File

src/Logger/LoggerController.php, line 101
Controller service for the MongoDB Watchdog reports.

Class

LoggerController

Namespace

Drupal\mongodb\Logger

Code

function sortTop($x, $y) {
  $cx = $x['count'];
  $cy = $y['count'];
  return $cy - $cx;
}