protected function DynamicRouter::sortRouteEnhancers

Sort enhancers by priority.

The highest priority number is the highest priority (reverse sorting).

Return value

RouteEnhancerInterface[] the sorted enhancers

1 call to DynamicRouter::sortRouteEnhancers()
DynamicRouter::getRouteEnhancers in drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/DynamicRouter.php
Sorts the enhancers and flattens them.

File

drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/DynamicRouter.php, line 278

Class

DynamicRouter
A flexible router accepting matcher and generator through injection and using the RouteEnhancer concept to generate additional data on the routes.

Namespace

Symfony\Cmf\Component\Routing

Code

protected function sortRouteEnhancers() {
  $sortedEnhancers = array();
  krsort($this->enhancers);
  foreach ($this->enhancers as $enhancers) {
    $sortedEnhancers = array_merge($sortedEnhancers, $enhancers);
  }
  return $sortedEnhancers;
}