You are here

function yamlform_update_8077 in YAML Form 8

Issue #2834654: Add close button to messages.

File

./yamlform.install, line 246
Install, update and uninstall functions for the YAML Form module.

Code

function yamlform_update_8077() {

  // Change yamlform.* to yamlform.* state.
  $yamlforms = YamlForm::loadMultiple();
  foreach ($yamlforms as $yamlform) {
    $state = \Drupal::state()
      ->get('yamlform.' . $yamlform
      ->id(), NULL);
    if ($state !== NULL) {
      \Drupal::state()
        ->set('yamlform.yamlform.' . $yamlform
        ->id(), $state);
      \Drupal::state()
        ->delete('yamlform.' . $yamlform
        ->id());
    }
  }
}