function patchinfo_system_info_alter in PatchInfo 8.2
Same name and namespace in other branches
- 8 patchinfo.module \patchinfo_system_info_alter()
- 7 patchinfo.module \patchinfo_system_info_alter()
Implements hook_system_info_alter().
File
- ./
patchinfo.module, line 18 - Patch Info primary module file.
Code
function patchinfo_system_info_alter(array $info, Extension $file, $type) {
$patches = [];
// Gather patch information from patch sources.
$plugin_manager = \Drupal::service('plugin.manager.patchinfo_source');
$sources = $plugin_manager
->getDefinitions();
foreach ($sources as $plugin_id => $plugin_defintion) {
$source = $plugin_manager
->createInstance($plugin_id, []);
$patches_source = $source
->getPatches($info, $file, $type);
$patches = array_merge_recursive($patches, $patches_source);
}
// Update patch database.
_patchinfo_clear_db($file
->getName());
foreach ($patches as $module => $info) {
_patchinfo_process_module($file
->getName(), $module, $info);
}
}