You are here

function varbase_uninstall_component in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 9.0.x

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.5 varbase.profile \varbase_uninstall_component()
  4. 8.6 varbase.profile \varbase_uninstall_component()
  5. 8.7 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 460
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);
  }
}