Skip to content
Snippets Groups Projects
Commit 0ccd5e99 authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #2908182: Added [Varbase Tour] module with list of tours for varbase,...

 Issue #2908182: Added [Varbase Tour] module with list of tours for varbase, and a Welcome to Varbase Modal Message after install
parent df4dfd38
No related branches found
No related tags found
No related merge requests found
......@@ -218,6 +218,16 @@ function varbase_assemble_extra_components(array &$install_state) {
$batch['operations'][] = ['varbase_fix_entity_update', (array) TRUE];
}
// Uninstall list of not needed modules after the config had been loaded.
// To be loaded from a ConfigBit yml file.
$uninstall_components = ['varbase_default_content'];
if (count($uninstall_components) > 0) {
foreach ($uninstall_components as $uninstall_component)
$batch['operations'][] = ['varbase_uninstall_component', (array) $uninstall_component];
}
return $batch;
}
......@@ -419,6 +429,18 @@ function varbase_config_bit_for_multilingual($enable_multilingual) {
}
/**
* Batch function to Uninstall list of not needed modules after the config had been loaded.
*
* @param string|array $uninstall_component
* Name of the extra component.
*/
function varbase_uninstall_component($uninstall_component) {
if (\Drupal::moduleHandler()->moduleExists($uninstall_component)) {
\Drupal::service('module_installer')->uninstall((array) $uninstall_component, FALSE);
}
}
/**
* Varbase after install finished.
*
......@@ -433,11 +455,6 @@ function varbase_config_bit_for_multilingual($enable_multilingual) {
function varbase_after_install_finished(array &$install_state) {
global $base_url;
// Disable Varbase Default Content feature mdoule.
if (\Drupal::moduleHandler()->moduleExists('varbase_default_content')) {
\Drupal::service('module_installer')->uninstall(['varbase_default_content'], FALSE);
}
// After install direction.
$after_install_direction = $base_url . '/?welcome';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment