Beispiel #1
0
 /**
  * Return whether the first item is less than, more than or equal to the second one
  *
  * @param   NavigationItem  $a
  * @param   NavigationItem  $b
  *
  * @return  int
  */
 protected function compareItems(NavigationItem $a, NavigationItem $b)
 {
     if ($a->getPriority() === $b->getPriority()) {
         return strcasecmp($a->getLabel(), $b->getLabel());
     }
     return $a->getPriority() > $b->getPriority() ? 1 : -1;
 }