You are here

public function OpenlayersPluginCollection::sortHelper in Openlayers 8.4

Provides uasort() callback to sort plugins.

Overrides DefaultLazyPluginCollection::sortHelper

File

src/OpenlayersPluginCollection.php, line 25

Class

OpenlayersPluginCollection
A collection of Openlayers plugins.

Namespace

Drupal\openlayers

Code

public function sortHelper($aID, $bID) {
  $a_label = $this
    ->get($aID)
    ->label();
  $b_label = $this
    ->get($bID)
    ->label();
  return Unicode::strcasecmp($a_label, $b_label);
}