function _patchinfo_get_patches in PatchInfo 7
Same name and namespace in other branches
- 8.2 patchinfo.module \_patchinfo_get_patches()
- 8 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 update_get_projects().
Return value
array Array containing all patch information for a module and its submodules.
3 calls to _patchinfo_get_patches()
- drush_patchinfo_list in ./
patchinfo.drush.inc - Command callback for patchinfo-list command.
- patchinfo_form_update_manager_update_form_alter in ./
patchinfo.module - Implements hook_form_FORM_ID_alter() for update_manager_update_form().
- patchinfo_update_report in ./
patchinfo.module - Custom implementation of theme_update_report().
File
- ./
patchinfo.module, line 146 - Patch Info primary module file.
Code
function _patchinfo_get_patches(array $patch_info, array $project_info) {
$return = array();
// 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;
}