function module_disable

Disables a given set of modules.

Deprecated

as of Drupal 8.0. Use Drupal::moduleHandler()->disable($module_list, $disable_dependents = TRUE).

20 calls to module_disable()
ActiveTest::_testActiveHelper in drupal/core/modules/field/lib/Drupal/field/Tests/ActiveTest.php
Helper function for testActive().
AggregatorConfigurationTest::testSettingsPage in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorConfigurationTest.php
Tests the settings form to ensure the correct default values are used.
BlockTest::testBlockModuleDisable in drupal/core/modules/block/lib/Drupal/block/Tests/BlockTest.php
Tests blocks belonging to disabled modules.
BreakpointThemeTest::testThemeBreakpointGroupModule in drupal/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointThemeTest.php
Test the breakpoints defined by the custom group in the module.
BundleTest::testBundleRegistrationDynamic in drupal/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php
Tests that the DIC keeps up with module enable/disable in the same request.

... See full list

File

drupal/core/includes/module.inc, line 221
API for loading and interacting with Drupal modules.

Code

function module_disable($module_list, $disable_dependents = TRUE) {
  Drupal::moduleHandler()
    ->disable($module_list, $disable_dependents);
}