Skip to content
Snippets Groups Projects
Commit 82ca79dc authored by Edmund Dunn's avatar Edmund Dunn Committed by Joseph Olstad
Browse files

Issue #3342032 by urvashi_vora, edmund.dunn, lars.stiebenz: Undefined method getImplementations()

parent 46c77c93
No related branches found
No related tags found
No related merge requests found
...@@ -404,12 +404,14 @@ function &libraries_info($name = NULL) { ...@@ -404,12 +404,14 @@ function &libraries_info($name = NULL) {
$libraries = []; $libraries = [];
// Gather information from hook_libraries_info(). // Gather information from hook_libraries_info().
$module_handler = \Drupal::moduleHandler(); $module_handler = \Drupal::moduleHandler();
foreach ($module_handler->getImplementations('libraries_info') as $module) { $hook = 'libraries_info';
foreach ($module_handler->invoke($module, 'libraries_info') as $machine_name => $properties) { $module_handler->invokeAllWith($hook, function (callable $hook, string $module) use ($module_handler, &$libraries) {
foreach ((array) $module_handler->invoke($module, 'libraries_info') as $machine_name => $properties) {
$properties['module'] = $module; $properties['module'] = $module;
$libraries[$machine_name] = $properties; $libraries[$machine_name] = $properties;
} }
} });
// Gather information from hook_libraries_info() in enabled themes. // Gather information from hook_libraries_info() in enabled themes.
// @see drupal_alter() // @see drupal_alter()
global $theme, $base_theme_info; global $theme, $base_theme_info;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment