You are here

function webform_update_8077 in Webform 8.5

Same name and namespace in other branches
  1. 6.x includes/webform.install.update.inc \webform_update_8077()

Issue #2909723: Improve hook requirements.

File

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

Code

function webform_update_8077() {

  // Convert libraries.cdn to requirements.cdn.
  $admin_config = \Drupal::configFactory()
    ->getEditable('webform.settings');
  $cdn = $admin_config
    ->get('libraries.cdn') ?: FALSE;
  $admin_config
    ->set('requirements.cdn', !$cdn);
  $admin_config
    ->clear('libraries.cdn');
  $admin_config
    ->save();
  _webform_update_admin_settings();
}