preUninstallForum example

$this->assertModuleSuccessfullyInstalled($module_to_install);
      }

      // Verify the help page.       $this->assertHelp($name$module->info['name']);

      // Uninstall the original module, plus everything else that was installed       // with it.       // @todo Remove in https://www.drupal.org/project/node/3261652       if ($name == 'forum') {
        // Forum has an extra step to be able to uninstall it.         $this->preUninstallForum();
      }

      // Delete all workspaces before uninstall.       if ($name == 'workspaces') {
        $workspaces = Workspace::loadMultiple();
        \Drupal::entityTypeManager()->getStorage('workspace')->delete($workspaces);
      }

      $now_installed_list = \Drupal::moduleHandler()->getModuleList();
      $added_modules = array_diff(array_keys($now_installed_list)array_keys($was_installed_list));
      while ($added_modules) {
        
Home | Imprint | This part of the site doesn't use cookies.