function webform_update_8183 in Webform 8.5
Same name and namespace in other branches
- 6.x includes/webform.install.update.inc \webform_update_8183()
Issue #3103571: Move deprecated icheck support into a dedicated sub-module.
File
- includes/
webform.install.update.inc, line 3425 - Archived Webform update hooks.
Code
function webform_update_8183() {
$config_factory = \Drupal::configFactory();
foreach ($config_factory
->listAll('webform.webform.') as $webform_config_name) {
$webform_config = $config_factory
->get($webform_config_name);
$elements = $webform_config
->get('elements');
if (strpos($elements, 'icheck') !== FALSE) {
// Enable the webform_icheck.module.
\Drupal::service('module_installer')
->install([
'webform_icheck',
]);
return;
}
}
}