function varbase_install_component in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 9.0.x
Same name and namespace in other branches
- 8.8 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 446 - 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);
}
}