You are here

public function DefaultLazyPluginCollection::sortHelper in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php \Drupal\Core\Plugin\DefaultLazyPluginCollection::sortHelper()

Provides uasort() callback to sort plugins.

1 call to DefaultLazyPluginCollection::sortHelper()
FilterPluginCollection::sortHelper in core/modules/filter/src/FilterPluginCollection.php
Provides uasort() callback to sort plugins.
2 methods override DefaultLazyPluginCollection::sortHelper()
FilterPluginCollection::sortHelper in core/modules/filter/src/FilterPluginCollection.php
Provides uasort() callback to sort plugins.
ImageEffectPluginCollection::sortHelper in core/modules/image/src/ImageEffectPluginCollection.php
Provides uasort() callback to sort plugins.

File

core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php, line 102
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());
}