function _patchinfo_get_patches in PatchInfo 8.2
Same name and namespace in other branches
- 8 patchinfo.module \_patchinfo_get_patches()
- 7 patchinfo.module \_patchinfo_get_patches()
Get all patches for a module (including its submodules).
Parameters
array $patch_info: Patch information as returned by _patchinfo_get_info().
array $project_info: Project information for a single project, i.e. a single value from the array returned by \Drupal::service('update.manager')->getProjects().
Return value
array Array containing all patch information for a module and its submodules.
4 calls to _patchinfo_get_patches()
- drush_patchinfo_list in ./
patchinfo.drush.inc - Command callback for patchinfo-list command.
- PatchInfoCommands::getTableData in src/
Commands/ PatchInfoCommands.php - Returns table data for all patches in projects.
- patchinfo_form_update_manager_update_form_alter in ./
patchinfo.module - Implements hook_form_FORM_ID_alter() for update_manager_update_form().
- patchinfo_preprocess_update_project_status in ./
patchinfo.module - Implements hook_preprocess_HOOK() for update-project-status.html.twig.
File
- ./
patchinfo.module, line 173 - Patch Info primary module file.
Code
function _patchinfo_get_patches(array $patch_info, array $project_info) {
$return = [];
// For each module in this project (including submodules) check, if
// there are patches and if so, merge them into our array containing
// all patch information for this project.
foreach ($project_info['includes'] as $module_key => $module_name) {
if (isset($patch_info[$module_key])) {
$return = array_merge($return, $patch_info[$module_key]);
}
}
return $return;
}