private static function TagService::sortByTitle in TagCloud 2.0.x
Same name and namespace in other branches
- 8 src/TagService.php \Drupal\tagclouds\TagService::sortByTitle()
- 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\tagcloudsCode
private static function sortByTitle($a, $b) {
return strnatcasecmp($a->name, $b->name);
}