You are here

function webform_update_8180 in Webform 6.x

Same name and namespace in other branches
  1. 8.5 includes/webform.install.update.inc \webform_update_8180()

Issue #3103171: Move deprecated jQuery UI buttons element into a sub-module.

File

includes/webform.install.update.inc, line 3356
Archived Webform update hooks.

Code

function webform_update_8180() {
  $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, 'webform_buttons') !== FALSE) {

      // Enable the webform_jqueryui_buttons.module.
      \Drupal::service('module_installer')
        ->install([
        'webform_jqueryui_buttons',
      ]);
      return;
    }
  }
}