function ConfigTestHooksHooks::updateIsSyncingStore
Helper function for testing hooks during configuration sync.
Parameters
string $hook: The fired hook.
\Drupal\config_test\Entity\ConfigTest $config_test: The ConfigTest entity.
File
-
core/
modules/ config/ tests/ config_test/ src/ Hook/ ConfigTestHooksHooks.php, line 87
Class
- ConfigTestHooksHooks
- Hook implementations for config_test.
Namespace
Drupal\config_test\HookCode
protected function updateIsSyncingStore($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.