function ModuleHandler::invokeAllWith
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::invokeAllWith()
- 10 core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::invokeAllWith()
- 9 core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::invokeAllWith()
File
-
core/
lib/ Drupal/ Core/ Extension/ ModuleHandler.php, line 284
Class
- ModuleHandler
- Class that manages modules in a Drupal installation.
Namespace
Drupal\Core\ExtensionCode
public function invokeAllWith(string $hook, callable $callback) : void {
$list = $this->getHookImplementationList($hook);
foreach ($list->iterateByModule() as $module => $listener) {
$callback($listener, $module);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.