module_exists

  1. drupal
    1. 5
    2. 6
    3. 7
    4. 8
Versions
5 – 7 module_exists($module)

Determine whether a given module exists.

Parameters

$module The name of the module (without the .module extension).

Return value

TRUE if the module is both installed and enabled.

▾ 43 functions call module_exists()

aggregator_sanitize_configuration in modules/aggregator/aggregator.module
Check and sanitize aggregator configuration.
bartik_process_html in themes/bartik/template.php
Override or insert variables into the page template for HTML output.
bartik_process_page in themes/bartik/template.php
Override or insert variables into the page template.
BlockTestCase::testBlockRehash in modules/block/block.test
Test _block_rehash().
block_admin_configure in modules/block/block.admin.inc
Form builder for the block configuration form.
block_block_list_alter in modules/block/block.module
Implements hook_block_list_alter().
cache_clear_all in includes/cache.inc
Expire data from the cache.
CommentFieldsTest::testCommentEnable in modules/comment/comment.test
Test that comment module works when enabled after a content module.
DashboardBlocksTestCase::testDisableEnable in modules/dashboard/dashboard.test
Test that the dashboard module can be disabled and enabled again, retaining its blocks.
dblog_menu in modules/dblog/dblog.module
Implements hook_menu().
field_system_info_alter in modules/field/field.module
Implements hook_system_info_alter().
file_example_session_contents in examples/file_example/file_example.module
A utility function to allow us to see what is in a session "file".
form_test_menu in modules/simpletest/tests/form_test.module
Implements hook_menu().
ForumTestCase::testEnableForumField in modules/forum/forum.test
Tests disabling and re-enabling forum.
garland_process_html in themes/garland/template.php
Override or insert variables into the html template.
garland_process_page in themes/garland/template.php
Override or insert variables into the page template.
hook_entity_info in modules/system/system.api.php
Inform the base system and the Field API about one or more entity types.
image_style_flush in modules/image/image.module
Flush cached media for a style.
language_list in includes/bootstrap.inc
Get a list of languages set up indexed by the specified key
menu_help in modules/menu/menu.module
Implements hook_help().
ModuleTestCase::assertModules in modules/system/system.test
Assert the list of modules are enabled or disabled.
ModuleUnitTest::testDependencyResolution in modules/simpletest/tests/module.test
Test dependency resolution.
module_disable in includes/module.inc
Disable a given set of modules.
node_admin_nodes in modules/node/node.admin.inc
Form builder: Builds the node administration overview.
node_delete_multiple in modules/node/node.module
Delete multiple nodes.
node_entity_info in modules/node/node.module
Implements hook_entity_info().
node_filters in modules/node/node.admin.inc
List node administration filters that can be applied.
node_overview_types in modules/node/content_types.inc
Displays the content type admin overview page.
path_admin_overview in modules/path/path.admin.inc
Return a listing of all defined URL aliases.
syslog_form_system_logging_settings_alter in modules/syslog/syslog.module
Implements hook_form_FORM_ID_alter().
SystemInfoAlterTestCase::testSystemInfoAlter in modules/system/system.test
Tests that {system}.info is rebuilt after a module that implements hook_system_info_alter() is enabled. Also tests if core *_list() functions return freshly altered info.
SystemMainContentFallback::testMainContentFallback in modules/system/system.test
Test availability of main content.
system_help in modules/system/system.module
Implements hook_help().
system_modules in modules/system/system.admin.inc
Menu callback; provides module enable/disable interface.
system_modules_submit in modules/system/system.admin.inc
Submit callback; handles modules form submission.
system_requirements in modules/system/system.install
Test and report Drupal installation requirements.
system_theme_settings in modules/system/system.admin.inc
Form builder; display theme configuration for entire site and individual themes.
template_preprocess_user_picture in modules/user/user.module
Process variables for user-picture.tpl.php.
token_example_example_form in examples/token_example/token_example.module
Form builder; display lists of supported token entities and text to tokenize.
token_example_token_info in examples/token_example/token_example.tokens.inc
Implements hook_token_info().
update_results_page in ./update.php
user_admin_settings in modules/user/user.admin.inc
Form builder; Configure user settings for this site.
_token_example_get_comment in examples/token_example/token_example.module
Builds a list of available comments.

Code

includes/module.inc, line 246

<?php
function module_exists($module) {
  $list = module_list();
  return isset($list[$module]);
}
?>