You are here

public function TagServiceInterface::sortTags in TagCloud 8

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

Orders a set of tags.

@todo If you feel like making this more modular, please send me patches.

Parameters

array $tags: An array of tag objects.

string $sort_order: (optional) Contains the sort and the order string. Possible values: "title, asc", "title, desc", "count, asc", "count, desc".

Return value

array A list of sorted tag objects.

1 method overrides TagServiceInterface::sortTags()
TagService::sortTags in src/TagService.php
Orders a set of tags.

File

src/TagServiceInterface.php, line 27

Class

TagServiceInterface
Interface TagServiceInterface.

Namespace

Drupal\tagclouds

Code

public function sortTags(array $tags, $sort_order = NULL);