You are here

function webform_update_8072 in Webform 8.5

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

Issue #2901738: Add support conditions to WebformHandler.

File

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

Code

function webform_update_8072() {
  drupal_flush_all_caches();

  /** @var \Drupal\webform\WebformInterface[] $webforms */
  $webforms = Webform::loadMultiple();
  foreach ($webforms as $webform) {
    $handlers = $webform
      ->getHandlers();
    foreach ($handlers as $handler) {
      $configuration = $handler
        ->getConfiguration();
      $handler
        ->setConfiguration($configuration);
    }
    $webform
      ->save();
  }
}