From 6aee3b438cd7d26cc9591ba8d0f535d4effe76aa Mon Sep 17 00:00:00 2001 From: Rajab Natshah <rajabn@gmail.com> Date: Sun, 8 Oct 2017 14:47:50 +0300 Subject: [PATCH] Issue #2911702: Update Varbase to use Drupal 8.4.0 - With Settings Tray module as outside_in had been renamed settings_tray. --- varbase.install | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/varbase.install b/varbase.install index 85d486ea..8f1cfb05 100644 --- a/varbase.install +++ b/varbase.install @@ -159,8 +159,17 @@ function varbase_update_8004() { * Enable Settings Tray module. */ function varbase_update_8005() { - if (!\Drupal::moduleHandler()->moduleExists('outside_in')) { - \Drupal::service('module_installer')->install(['outside_in'], FALSE); + // Read the extension configuration. + $modules_data = \Drupal::config('core.extension')->get('module'); + // Unset the outside_in module. + if (isset($modules_data['outside_in'])) { + unset($modules_data['outside_in']); + } + // Save the configuration. + \Drupal::configFactory()->getEditable('core.extension')->set('module', $modules_data)->save(); + + if (!\Drupal::moduleHandler()->moduleExists('settings_tray')) { + \Drupal::service('module_installer')->install(['settings_tray'], FALSE); } } @@ -505,9 +514,15 @@ function varbase_update_8041() { * Enable Settings Tray module as outside_in had been renamed settings_tray. */ function varbase_update_8042() { - if (\Drupal::moduleHandler()->moduleExists('outside_in')) { - \Drupal::service('module_installer')->uninstall(['outside_in'], FALSE); + + // Read the extension configuration. + $modules_data = \Drupal::config('core.extension')->get('module'); + // Unset the outside_in module. + if (isset($modules_data['outside_in'])) { + unset($modules_data['outside_in']); } + // Save the configuration. + \Drupal::configFactory()->getEditable('core.extension')->set('module', $modules_data)->save(); if (!\Drupal::moduleHandler()->moduleExists('settings_tray')) { \Drupal::service('module_installer')->install(['settings_tray'], FALSE); -- GitLab