You are here

function varbase_uninstall_component in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.5

Same name and namespace in other branches
  1. 8.8 varbase.profile \varbase_uninstall_component()
  2. 8.4 varbase.profile \varbase_uninstall_component()
  3. 8.6 varbase.profile \varbase_uninstall_component()
  4. 8.7 varbase.profile \varbase_uninstall_component()
  5. 9.0.x varbase.profile \varbase_uninstall_component()

Batch function to Uninstall list of not needed modules after the config had been loaded.

Parameters

string|array $uninstall_component: Name of the extra component.

1 string reference to 'varbase_uninstall_component'
varbase_assemble_extra_components in ./varbase.profile
Batch job to assemble Varbase extra components.

File

./varbase.profile, line 419
Enables modules and site configuration for a Varbase site installation.

Code

function varbase_uninstall_component($uninstall_component) {
  if (\Drupal::moduleHandler()
    ->moduleExists($uninstall_component)) {
    \Drupal::service('module_installer')
      ->uninstall((array) $uninstall_component, FALSE);
  }
}