function _webform_update_webform_submission_translation in Webform 6.x
Same name and namespace in other branches
- 8.5 includes/webform.install.inc \_webform_update_webform_submission_translation()
Update webform submission translations.
3 calls to _webform_update_webform_submission_translation()
- WebformAdminConfigAdvancedForm::submitForm in src/
Form/ AdminConfig/ WebformAdminConfigAdvancedForm.php - Form submission handler.
- WebformCliService::drush_webform_repair in src/
Commands/ WebformCliService.php - webform_update_8166 in includes/
webform.install.update.inc - Issue #3049023: All Webforms are listed on Content languages form.
File
- includes/
webform.install.inc, line 345 - Webform install helper functions.
Code
function _webform_update_webform_submission_translation() {
$config_factory = \Drupal::configFactory();
foreach ($config_factory
->listAll('language.content_settings.webform_submission.') as $config_name) {
$config = $config_factory
->getEditable($config_name);
// Make sure 'Default language' (default_langcode) and
// 'Show language selector on create and edit pages' (language_alterable)
// have not been customized.
if ($config
->get('default_langcode') === 'site_default' && $config
->get('language_alterable') === FALSE) {
$config_factory
->getEditable($config_name)
->delete();
}
}
}