function suggestion_update_8101 in Autocomplete Search Suggestions 3.0.x
Same name and namespace in other branches
- 8 suggestion.install \suggestion_update_8101()
Update migrate configuration settings to new architecture.
File
- ./
suggestion.install, line 68 - Contains suggestion.install.
Code
function suggestion_update_8101() {
$cfg = \Drupal::configFactory()
->getEditable('suggestion.config');
$field_name = $cfg
->get('suggestion_field_name');
$form_key = $cfg
->get('suggestion_form_id');
$max = $cfg
->get('atoms');
$cfg
->clear('atoms');
$cfg
->clear('suggestion_field_name');
$cfg
->clear('suggestion_form_id');
$cfg
->save(TRUE);
$cfg
->set('atoms_max', $max);
$cfg
->set('atoms_min', 1);
$cfg
->set('entry_style', 'simple');
$cfg
->set('field_name', $field_name);
$cfg
->set('form_key', $form_key);
$cfg
->save(TRUE);
drupal_flush_all_caches();
}