ExtensionDiscovery::process

protected ExtensionDiscovery::process(array $all_files)

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.

File

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

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;
}
doc_Drupal
2016-10-29 09:09:43
Comments
Leave a Comment

Please login to continue.