protected function ConfigWithTranslationTest::setConfigSyncValue in Config Ignore 8.3
Sets a config value in the sync store.
Parameters
string $config_name: The config name.
string $key: The key of the config value to be set. It only supports top level keys.
mixed $value: The value to be set.
string|null $langcode: (optional) If passed, the value will be set in the $langcode language collection.
1 call to ConfigWithTranslationTest::setConfigSyncValue()
- ConfigWithTranslationTest::testConfigImport in tests/
src/ Functional/ ConfigWithTranslationTest.php - Tests config import.
File
- tests/
src/ Functional/ ConfigWithTranslationTest.php, line 280
Class
- ConfigWithTranslationTest
- Tests config_ignore with translated configurations.
Namespace
Drupal\Tests\config_ignore\FunctionalCode
protected function setConfigSyncValue($config_name, $key, $value, $langcode = NULL) {
$sync_storage = $this
->getSyncStorage($langcode);
$data = $sync_storage
->read($config_name);
$data[$key] = $value;
$sync_storage
->write($config_name, $data);
}