You are here

protected function ExtensionDiscovery::process in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Extension/ExtensionDiscovery.php \Drupal\Core\Extension\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 373
Contains \Drupal\Core\Extension\ExtensionDiscovery.

Class

ExtensionDiscovery
Discovers available extensions in the filesystem.

Namespace

Drupal\Core\Extension

Code

protected function process(array $all_files) {
  $files = array();

  // 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;
}