function module_exists

Determines whether a given module exists.

Deprecated

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

See also

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

92 calls to module_exists()
aggregator_form_category_submit in drupal/core/modules/aggregator/aggregator.admin.inc
Form submission handler for aggregator_form_category().
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.
BlockAccessController::checkAccess in drupal/core/modules/block/lib/Drupal/block/BlockAccessController.php
Performs access checks.

... 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);
}