public function DefaultLazyPluginCollection::sortHelper in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php \Drupal\Core\Plugin\DefaultLazyPluginCollection::sortHelper()
- 9 core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php \Drupal\Core\Plugin\DefaultLazyPluginCollection::sortHelper()
Provides uasort() callback to sort plugins.
File
- core/
lib/ Drupal/ Core/ Plugin/ DefaultLazyPluginCollection.php, line 97
Class
- DefaultLazyPluginCollection
- Provides a default plugin collection for a plugin type.
Namespace
Drupal\Core\PluginCode
public function sortHelper($aID, $bID) {
$a = $this
->get($aID);
$b = $this
->get($bID);
return strnatcasecmp($a
->getPluginId(), $b
->getPluginId());
}