function ModuleInstallerInterface::uninstall

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php \Drupal\Core\Extension\ModuleInstallerInterface::uninstall()
  2. 8.9.x core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php \Drupal\Core\Extension\ModuleInstallerInterface::uninstall()
  3. 10 core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php \Drupal\Core\Extension\ModuleInstallerInterface::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.

Throws

\Drupal\Core\Extension\ModuleUninstallValidatorException Thrown when validation prevented the module from being uninstalled.

See also

hook_module_preuninstall()

hook_uninstall()

hook_modules_uninstalled()

2 methods override ModuleInstallerInterface::uninstall()
ModuleInstaller::uninstall in core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php
ModuleInstaller::uninstall in core/lib/Drupal/Core/Extension/ModuleInstaller.php

File

core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php, line 73

Class

ModuleInstallerInterface
Provides the installation of modules with creating the db schema and more.

Namespace

Drupal\Core\Extension

Code

public function uninstall(array $module_list, $uninstall_dependents = TRUE);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.