You are here

public function DefaultLazyPluginCollection::sortHelper in Plug 7

Provides uasort() callback to sort plugins.

File

lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php, line 100
Contains \Drupal\Core\Plugin\DefaultLazyPluginCollection.

Class

DefaultLazyPluginCollection
Provides a default plugin collection for a plugin type.

Namespace

Drupal\Core\Plugin

Code

public function sortHelper($aID, $bID) {
  $a = $this
    ->get($aID);
  $b = $this
    ->get($bID);
  return strnatcasecmp($a
    ->getPluginId(), $b
    ->getPluginId());
}