Provides information about modules' implementations of a hook.
string $hook: The name of the hook (e.g. "help" or "menu").
array An array whose keys are the names of the modules which are implementing this hook and whose values are either an array of information from hook_hook_info() or FALSE if the implementation is in the module file.
protected function getImplementationInfo($hook) {
if (isset($this->implementations[$hook])) {
return $this->implementations[$hook];
}
$this->implementations[$hook] = array();
$hook_info = $this
->getHookInfo();
foreach ($this->moduleList as $module => $filename) {
$include_file = isset($hook_info[$hook]['group']) && $this
->loadInclude($module, 'inc', $module . '.' . $hook_info[$hook]['group']);
// Since $this->hookImplements() may needlessly try to load the include
// file again, function_exists() is used directly here.
if (function_exists($module . '_' . $hook)) {
$this->implementations[$hook][$module] = $include_file ? $hook_info[$hook]['group'] : FALSE;
}
}
// Allow modules to change the weight of specific implementations but avoid
// an infinite loop.
if ($hook != 'module_implements_alter') {
$this
->alter('module_implements', $this->implementations[$hook], $hook);
}
return $this->implementations[$hook];
}