Skip to content
Snippets Groups Projects
Commit ad3e9369 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2300821 by joshi.rohit100: Remove module_invoke_all() as it is deprecated.

parent 4f246c7e
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -1149,25 +1149,6 @@ function module_invoke($module, $hook) { ...@@ -1149,25 +1149,6 @@ function module_invoke($module, $hook) {
return \Drupal::moduleHandler()->invoke($module, $hook, $args); return \Drupal::moduleHandler()->invoke($module, $hook, $args);
} }
/**
* Invokes a hook in all enabled modules that implement it.
*
* All arguments are passed by value. Use \Drupal::moduleHandler()->alter() if
* you need to pass arguments by reference.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::moduleHandler()->invokeAll($hook).
*
* @see \Drupal\Core\Extension\ModuleHandler::alter()
* @see \Drupal\Core\Extension\ModuleHandler::invokeAll()
*/
function module_invoke_all($hook) {
$args = func_get_args();
// Remove $hook from the arguments.
unset($args[0]);
return \Drupal::moduleHandler()->invokeAll($hook, $args);
}
/** /**
* Passes alterable variables to specific hook_TYPE_alter() implementations. * Passes alterable variables to specific hook_TYPE_alter() implementations.
* *
......
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