public function UpdateModuleHandler::uninstall

Uninstalls a given list of disabled modules.

Parameters

array $module_list: The modules to uninstall. It is the caller's responsibility to ensure that all modules in this list have already been disabled before this function is called.

bool $uninstall_dependents: (optional) If TRUE, the function will check that all modules which depend on the passed-in module list either are already uninstalled or contained in the list, and it will ensure that the modules are uninstalled in the correct order. This incurs a significant performance cost, so use FALSE if you know $module_list is already complete and in the correct order. Defaults to TRUE.

Return value

bool Returns TRUE if the operation succeeds or FALSE if it aborts due to an unsafe condition, namely, $uninstall_dependents is TRUE and a module in $module_list has dependents which are not already uninstalled and not also included in $module_list).

Overrides ModuleHandler::uninstall

File

drupal/core/lib/Drupal/Core/Extension/UpdateModuleHandler.php, line 140
Contains \Drupal\Core\Extension\UpdateModuleHandler.

Class

UpdateModuleHandler
Deals with module enables and throws exception if hooks fired during updates.

Namespace

Drupal\Core\Extension

Code

public function uninstall($module_list = array(), $uninstall_dependents = TRUE) {
  throw new \LogicException('Uninstalling modules is not supported during updates');
}