You are here

public static function OpignoModuleBadges::opignoModuleResultsSortByDate in Opigno module 8

Same name and namespace in other branches
  1. 3.x src/OpignoModuleBadges.php \Drupal\opigno_module\OpignoModuleBadges::opignoModuleResultsSortByDate()

Custom sort by date function.

File

src/OpignoModuleBadges.php, line 196

Class

OpignoModuleBadges
Class OpignoModuleBadges.

Namespace

Drupal\opigno_module

Code

public static function opignoModuleResultsSortByDate($a, $b) {
  return strtotime($a->completed) < strtotime($b->completed);
}