public static function Action::sort

Helper callback for uasort() to sort configuration entities by weight and label.

Overrides ConfigEntityBase::sort

File

drupal/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/Action.php, line 154
Contains \Drupal\system\Plugin\Core\Entity\Action.

Class

Action
Defines the configured action entity.

Namespace

Drupal\system\Plugin\Core\Entity

Code

public static function sort($a, $b) {
  $a_type = $a
    ->getType();
  $b_type = $b
    ->getType();
  if ($a_type != $b_type) {
    return strnatcasecmp($a_type, $b_type);
  }
  return parent::sort($a, $b);
}