function _config_import_test_config_import_steps_alter

Same name in other branches
  1. 9 core/modules/config/tests/config_import_test/config_import_test.module \_config_import_test_config_import_steps_alter()
  2. 8.9.x core/modules/config/tests/config_import_test/config_import_test.module \_config_import_test_config_import_steps_alter()
  3. 10 core/modules/config/tests/config_import_test/config_import_test.module \_config_import_test_config_import_steps_alter()

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.

1 string reference to '_config_import_test_config_import_steps_alter'
config_import_test_config_import_steps_alter in core/modules/config/tests/config_import_test/config_import_test.module
Implements hook_config_import_steps_alter().

File

core/modules/config/tests/config_import_test/config_import_test.module, line 27

Code

function _config_import_test_config_import_steps_alter(&$context, ConfigImporter $config_importer) {
    $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.