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

Breadcrumb

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

function ExtensionDiscovery::process

Same name in this branch
  1. 11.1.x vendor/mglaman/phpstan-drupal/src/Drupal/ExtensionDiscovery.php \mglaman\PHPStanDrupal\Drupal\ExtensionDiscovery::process()

Processes the filtered and sorted list of extensions.

Extensions discovered in later search paths override earlier, unless they are not compatible with the current version of Drupal core.

Parameters

\Drupal\Core\Extension\Extension[] $all_files: The sorted list of all extensions that were found.

Return value

\Drupal\Core\Extension\Extension[] The filtered list of extensions, keyed by extension name.

1 call to ExtensionDiscovery::process()
ExtensionDiscovery::scan in core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
Discovers available extensions of a given type.

File

core/lib/Drupal/Core/Extension/ExtensionDiscovery.php, line 378

Class

ExtensionDiscovery
Discovers available extensions in the filesystem.

Namespace

Drupal\Core\Extension

Code

protected function process(array $all_files) {
    $files = [];
    // Duplicate files found in later search directories take precedence over
    // earlier ones; they replace the extension in the existing $files array.
    foreach ($all_files as $file) {
        $files[$file->getName()] = $file;
    }
    return $files;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal