Determines whether a module implements a hook.
as of Drupal 8.0. Use Drupal::moduleHandler()->implementsHook($module, $hook).
\Drupal\Core\Extension\ModuleHandler::implementsHook()
function module_hook($module, $hook) {
return Drupal::moduleHandler()
->implementsHook($module, $hook);
}