You are here

function autosave_form_update_8002 in Autosave Form 8

Populates the setting "only_on_form_change".

File

./autosave_form.install, line 105
Install, update and uninstall functions for the autosave_form module.

Code

function autosave_form_update_8002() {
  $config = \Drupal::configFactory()
    ->getEditable('autosave_form.settings');
  if ($config
    ->get('only_on_form_change') === NULL) {
    $config
      ->set('only_on_form_change', FALSE);
    $config
      ->save(TRUE);
  }
}