Implements \Drupal\Core\Extension\ModuleHandlerInterface::getHookInfo().
Overrides ModuleHandlerInterface::getHookInfo
public function getHookInfo() {
if (isset($this->hookInfo)) {
return $this->hookInfo;
}
$this->hookInfo = array();
// We can't use $this->invokeAll() here or it would cause an infinite
// loop.
// Make sure that the modules are loaded before checking.
$this
->reload();
foreach ($this->moduleList as $module => $filename) {
$function = $module . '_hook_info';
if (function_exists($function)) {
$result = $function();
if (isset($result) && is_array($result)) {
$this->hookInfo = NestedArray::mergeDeep($this->hookInfo, $result);
}
}
}
return $this->hookInfo;
}