Commit ad3e9369 authored by alexpott's avatar alexpott

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

parent 4f246c7e
......@@ -1149,25 +1149,6 @@ function module_invoke($module, $hook) {
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.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment