function ModuleHandler::invoke
Same name in other branches
- 9 core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::invoke()
- 8.9.x core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::invoke()
- 11.x core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::invoke()
1 call to ModuleHandler::invoke()
- ModuleHandler::invokeDeprecated in core/
lib/ Drupal/ Core/ Extension/ ModuleHandler.php
File
-
core/
lib/ Drupal/ Core/ Extension/ ModuleHandler.php, line 402
Class
- ModuleHandler
- Class that manages modules in a Drupal installation.
Namespace
Drupal\Core\ExtensionCode
public function invoke($module, $hook, array $args = []) {
if (!$this->hasImplementations($hook, $module)) {
return;
}
$hookInvoker = \Closure::fromCallable($module . '_' . $hook);
return call_user_func_array($hookInvoker, $args);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.