Implements \Drupal\Core\Extension\ModuleHandlerInterface::implementsHook().
Overrides ModuleHandlerInterface::implementsHook
public function implementsHook($module, $hook) {
$function = $module . '_' . $hook;
if (function_exists($function)) {
return TRUE;
}
// If the hook implementation does not exist, check whether it lives in an
// optional include file registered via hook_hook_info().
$hook_info = $this
->getHookInfo();
if (isset($hook_info[$hook]['group'])) {
$this
->loadInclude($module, 'inc', $module . '.' . $hook_info[$hook]['group']);
if (function_exists($function)) {
return TRUE;
}
}
return FALSE;
}