function ExtensionDiscovery::process
Same name in this branch
- 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\ExtensionCode
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;
}