function module_exists

8.x bootstrap.inc module_exists($module)

Determines whether a given module exists.

Deprecated

as of Drupal 8.0. Use Drupal::moduleHandler()->moduleExists($hook).

See also

\Drupal\Core\Extension\ModuleHandler::moduleExists()

43 calls to module_exists()
aggregator_save_category in drupal/core/modules/aggregator/aggregator.module
Adds/edits/deletes aggregator categories.
bartik_process_html in drupal/core/themes/bartik/bartik.theme
Implements hook_process_HOOK() for html.tpl.php.
bartik_process_page in drupal/core/themes/bartik/bartik.theme
Implements hook_process_HOOK() for page.html.twig.
block_help in drupal/core/modules/block/block.module
Implements hook_help().
breakpoint_get_module_media_queries in drupal/core/modules/breakpoint/breakpoint.module
Get a list of available breakpoints from a specified module.

... See full list

File

drupal/core/includes/bootstrap.inc, line 2242
Functions that need to be loaded on every Drupal request.

Code

function module_exists($module) {
  return Drupal::moduleHandler()->moduleExists($module);
}