You are here

private static function TagService::sortByTitle in TagCloud 8

Same name and namespace in other branches
  1. 2.0.x src/TagService.php \Drupal\tagclouds\TagService::sortByTitle()
  2. 1.0.x src/TagService.php \Drupal\tagclouds\TagService::sortByTitle()

Callback for usort, sort by title.

Parameters

object $a: The A sample.

object $b: The B Sample.

Return value

int comparison result.

See also

:sortTags()

File

src/TagService.php, line 202

Class

TagService
Class TagService.

Namespace

Drupal\tagclouds

Code

private static function sortByTitle($a, $b) {
  return strnatcasecmp($a->name, $b->name);
}