function webform_update_8135 in Webform 6.x
Same name and namespace in other branches
- 8.5 includes/webform.install.update.inc \webform_update_8135()
Issue #2984868: Allow to specify the text format for emails.
File
- includes/
webform.install.update.inc, line 2449 - Archived Webform update hooks.
Code
function webform_update_8135() {
$admin_config = \Drupal::configFactory()
->getEditable('webform.settings');
$settings = $admin_config
->getRawData();
$settings['html_editor']['element_format'] = $settings['html_editor']['format'];
$settings['html_editor']['mail_format'] = $settings['html_editor']['format'];
unset($settings['html_editor']['format']);
$admin_config
->setData($settings)
->save();
}