You are here

function suggestion_update_8203 in Autocomplete Search Suggestions 8.2

Update migrate configuration settings to new architecture.

File

./suggestion.install, line 143
Contains suggestion.install.

Code

function suggestion_update_8203() {
  $cfg = \Drupal::configFactory()
    ->getEditable('suggestion.config');
  $field_name = $cfg
    ->get('suggestion_field_name');
  $form_key = $cfg
    ->get('suggestion_form_id');
  $cfg
    ->clear('suggestion_field_name');
  $cfg
    ->clear('suggestion_form_id');
  $cfg
    ->save(TRUE);
  $cfg
    ->set('entry_style', 'simple');
  $cfg
    ->set('field_name', $field_name);
  $cfg
    ->set('form_key', $form_key);
  $cfg
    ->save(TRUE);
  drupal_flush_all_caches();
}