You are here

public function ModuleInstaller::uninstall in Service Container 7

Same name and namespace in other branches
  1. 7.2 src/Extension/ModuleInstaller.php \Drupal\service_container\Extension\ModuleInstaller::uninstall()

Uninstalls a given list of modules.

Parameters

string[] $module_list: The modules to uninstall.

bool $uninstall_dependents: (optional) If TRUE, dependent modules will automatically be uninstalled in the correct order. This incurs a significant performance cost, so use FALSE if you know $module_list is already complete.

Return value

bool FALSE if one or more dependencies are missing, TRUE otherwise.

Overrides ModuleInstallerInterface::uninstall

See also

hook_module_preuninstall()

hook_uninstall()

hook_modules_uninstalled()

File

src/Extension/ModuleInstaller.php, line 48
Contains \Drupal\service_container\Extension\ModuleInstaller.

Class

ModuleInstaller
Provides a module installer compatible with D7.

Namespace

Drupal\service_container\Extension

Code

public function uninstall(array $module_list, $uninstall_dependents = TRUE) {
  $this->drupal7
    ->module_disable($module_list, $uninstall_dependents);
  $this->drupal7
    ->drupal_uninstall_modules($module_list);
}