You are here

public function TagPluginCollection::sortHelper in Extensible BBCode 8.3

Same name and namespace in other branches
  1. 4.0.x src/TagPluginCollection.php \Drupal\xbbcode\TagPluginCollection::sortHelper()

Provides uasort() callback to sort plugins.

Overrides DefaultLazyPluginCollection::sortHelper

File

src/TagPluginCollection.php, line 79

Class

TagPluginCollection
A collection of tag plugins.

Namespace

Drupal\xbbcode

Code

public function sortHelper($a, $b) {

  // Sort by instance ID (which is the tag name) instead of plugin ID.
  return strnatcasecmp($a, $b);
}