You are here

public function BreadcrumbTitleResolverManager::sortByWeight in Breadcrumb Manager 8

Sort by weight.

Parameters

array $a: The first plugin definition.

array $b: The second plugin definition.

Return value

int The sorting order.

File

src/Plugin/BreadcrumbTitleResolverManager.php, line 90

Class

BreadcrumbTitleResolverManager
Provides the Breadcrumb title resolver plugin manager.

Namespace

Drupal\breadcrumb_manager\Plugin

Code

public function sortByWeight(array $a, array $b) {
  if ($a['weight'] == $b['weight']) {
    return 0;
  }
  return $a['weight'] < $b['weight'] ? -1 : 1;
}