function webform_update_8173 in Webform 6.x
Same name and namespace in other branches
- 8.5 includes/webform.install.update.inc \webform_update_8173()
Issue #3076086: Allow confirm email to use flexbox.
File
- includes/
webform.install.update.inc, line 3222 - Archived Webform update hooks.
Code
function webform_update_8173() {
$config_factory = \Drupal::configFactory();
foreach ($config_factory
->listAll('webform.webform.') as $webform_config_name) {
$webform_config = $config_factory
->getEditable($webform_config_name);
$data = $webform_config
->getRawData();
if (strpos($data['elements'], 'webform_flexbox') !== FALSE && strpos($data['elements'], 'webform_email_confirm') !== FALSE) {
$elements = WebformYaml::decode($data['elements']);
_webform_update_8173($elements);
$data['elements'] = WebformYaml::encode($elements);
$webform_config
->setData($data)
->save();
}
}
}