You are here

public function ModuleInstaller::uninstall in Drupal 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/Extension/ModuleInstaller.php \Drupal\Core\Extension\ModuleInstaller::uninstall()
  2. 8 core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\Extension\ModuleInstaller::uninstall()
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\Extension\ModuleInstaller::uninstall()
  2. 10 core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\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

core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php, line 89

Class

ModuleInstaller
Provides a proxy class for \Drupal\Core\Extension\ModuleInstaller.

Namespace

Drupal\Core\ProxyClass\Extension

Code

public function uninstall(array $module_list, $uninstall_dependents = true) {
  return $this
    ->lazyLoadItself()
    ->uninstall($module_list, $uninstall_dependents);
}