function SystemTestHooks::modulePreinstall
Implements hook_module_preinstall().
File
-
core/
modules/ system/ tests/ modules/ system_test/ src/ Hook/ SystemTestHooks.php, line 128
Class
- SystemTestHooks
- Hook implementations for system_test.
Namespace
Drupal\system_test\HookCode
public function modulePreinstall($module, bool $is_syncing) : void {
\Drupal::messenger()->addStatus('system_test_preinstall_module called');
\Drupal::state()->set('system_test_preinstall_module', $module);
// Save the config.installer isSyncing() value to state to check that it is
// correctly set when installing module during config import.
\Drupal::state()->set('system_test_preinstall_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_preinstall_module_syncing_param', $is_syncing);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.