function system_test_module_preuninstall

Same name in other branches
  1. 9 core/modules/system/tests/modules/system_test/system_test.module \system_test_module_preuninstall()
  2. 8.9.x core/modules/system/tests/modules/system_test/system_test.module \system_test_module_preuninstall()

Implements hook_module_preuninstall().

File

core/modules/system/tests/modules/system_test/system_test.module, line 159

Code

function system_test_module_preuninstall($module, bool $is_syncing) {
    \Drupal::state()->set('system_test_preuninstall_module', $module);
    // Save the config.installer isSyncing() value to state to check that it is
    // correctly set when uninstalling module during config import.
    \Drupal::state()->set('system_test_preuninstall_module_config_installer_syncing', \Drupal::service('config.installer')->isSyncing());
    // Save the $is_syncing parameter value to state to check that it is correctly
    // set when installing module during config import.
    \Drupal::state()->set('system_test_preuninstall_module_syncing_param', $is_syncing);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.