You are here

function varbase_install_component in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.8

Same name and namespace in other branches
  1. 9.0.x varbase.profile \varbase_install_component()

Batch function to Install needed modules.

Parameters

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

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

File

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

Code

function varbase_install_component($install_component) {
  if (!\Drupal::moduleHandler()
    ->moduleExists($install_component)) {
    \Drupal::service('module_installer')
      ->install([
      $install_component,
    ], FALSE);
  }
}