You are here

public function FacetSourceDeriverBase::compareDerivatives in Facets 8

Compares two plugin definitions according to their labels.

Parameters

array $a: A plugin definition, with at least a "label" key.

array $b: Another plugin definition.

Return value

int An integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.

File

src/FacetSource/FacetSourceDeriverBase.php, line 126

Class

FacetSourceDeriverBase
A base class for facet source derivers.

Namespace

Drupal\facets\FacetSource

Code

public function compareDerivatives(array $a, array $b) {
  return strnatcasecmp($a['label'], $b['label']);
}