function _config_test_update_is_syncing_store

Same name and namespace in other branches
  1. 9 core/modules/config/tests/config_test/config_test.hooks.inc \_config_test_update_is_syncing_store()
  2. 8.9.x core/modules/config/tests/config_test/config_test.hooks.inc \_config_test_update_is_syncing_store()
  3. 10 core/modules/config/tests/config_test/config_test.hooks.inc \_config_test_update_is_syncing_store()

Helper function for testing hooks during configuration sync.

Parameters

string $hook: The fired hook.

\Drupal\config_test\Entity\ConfigTest $config_test: The ConfigTest entity.

6 calls to _config_test_update_is_syncing_store()
config_test_config_test_create in core/modules/config/tests/config_test/config_test.hooks.inc
Implements hook_ENTITY_TYPE_create() for 'config_test'.
config_test_config_test_delete in core/modules/config/tests/config_test/config_test.hooks.inc
Implements hook_config_test_delete().
config_test_config_test_insert in core/modules/config/tests/config_test/config_test.hooks.inc
Implements hook_config_test_insert().
config_test_config_test_predelete in core/modules/config/tests/config_test/config_test.hooks.inc
Implements hook_config_test_predelete().
config_test_config_test_presave in core/modules/config/tests/config_test/config_test.hooks.inc
Implements hook_config_test_presave().

... See full list

File

core/modules/config/tests/config_test/config_test.hooks.inc, line 79

Code

function _config_test_update_is_syncing_store($hook, ConfigTest $config_test) {
    $current_value = \Drupal::state()->get('config_test.store_isSyncing', FALSE);
    if ($current_value !== FALSE) {
        $current_value['global_state::' . $hook] = \Drupal::isConfigSyncing();
        $current_value['entity_state::' . $hook] = $config_test->isSyncing();
        \Drupal::state()->set('config_test.store_isSyncing', $current_value);
    }
}

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