function webform_update_8117 in Webform 6.x
Same name and namespace in other branches
- 8.5 includes/webform.install.update.inc \webform_update_8117()
Issue #2957192: Add postal_code to test data.
File
- includes/
webform.install.update.inc, line 2173 - Archived Webform update hooks.
Code
function webform_update_8117() {
$config = \Drupal::configFactory()
->getEditable('webform.settings');
$names = Yaml::decode($config
->get('test.names'));
$names += [
'postal_code' => [
'11111',
'12345',
'12345-6789',
],
];
$config
->set('test.names', WebformYaml::encode($names));
$config
->save();
}