function ConfigImportTestHooks::stepAlter
Implements configuration synchronization step added by an alter for testing.
Parameters
array $context: The batch context.
\Drupal\Core\Config\ConfigImporter $config_importer: The configuration importer.
File
-
core/
modules/ config/ tests/ config_import_test/ src/ Hook/ ConfigImportTestHooks.php, line 39
Class
- ConfigImportTestHooks
- Hook implementations for config_import_test.
Namespace
Drupal\config_import_test\HookCode
public function stepAlter(&$context, ConfigImporter $config_importer) : void {
$GLOBALS['hook_config_test']['config_import_steps_alter'] = TRUE;
if (\Drupal::state()->get('config_import_steps_alter.error', FALSE)) {
$context['results']['errors'][] = '_config_import_test_config_import_steps_alter batch error';
$config_importer->logError('_config_import_test_config_import_steps_alter ConfigImporter error');
}
$context['finished'] = 1;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.