Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PassConfig.php

function PassConfig::sortPasses

Sort passes by priority.

Parameters

array $passes CompilerPassInterface instances with their priority as key:

Return value

CompilerPassInterface[]

5 calls to PassConfig::sortPasses()
PassConfig::getAfterRemovingPasses in vendor/symfony/dependency-injection/Compiler/PassConfig.php
Gets all passes for the AfterRemoving pass.
PassConfig::getBeforeOptimizationPasses in vendor/symfony/dependency-injection/Compiler/PassConfig.php
Gets all passes for the BeforeOptimization pass.
PassConfig::getBeforeRemovingPasses in vendor/symfony/dependency-injection/Compiler/PassConfig.php
Gets all passes for the BeforeRemoving pass.
PassConfig::getOptimizationPasses in vendor/symfony/dependency-injection/Compiler/PassConfig.php
Gets all passes for the Optimization pass.
PassConfig::getRemovingPasses in vendor/symfony/dependency-injection/Compiler/PassConfig.php
Gets all passes for the Removing pass.

File

vendor/symfony/dependency-injection/Compiler/PassConfig.php, line 263

Class

PassConfig
Compiler Pass Configuration.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

private function sortPasses(array $passes) : array {
    if (0 === \count($passes)) {
        return [];
    }
    krsort($passes);
    // Flatten the array
    return array_merge(...$passes);
}
RSS feed
Powered by Drupal