You are here

public function GroupContentEnablerCollection::sortHelper in Group 8

Sorts plugins by provider.

Overrides DefaultLazyPluginCollection::sortHelper

File

src/Plugin/GroupContentEnablerCollection.php, line 26

Class

GroupContentEnablerCollection
A collection of group content plugins.

Namespace

Drupal\group\Plugin

Code

public function sortHelper($aID, $bID) {
  $a = $this
    ->get($aID);
  $b = $this
    ->get($bID);
  if ($a
    ->getProvider() != $b
    ->getProvider()) {
    return strnatcasecmp($a
      ->getProvider(), $b
      ->getProvider());
  }
  return parent::sortHelper($aID, $bID);
}