module_load_include('install', 'my_module'); $options = array('enable_dependencies' => TRUE); module_enable(array('my_module'), $options);
module_disable(array('my_module'));
if (module_exists('my_module')) { // Do something if the module is enabled. }This code checks if the "my_module" module is currently enabled. The moduleHandler is part of the Drupal core library and is a package within the Drupal project.