You are here

function search_api_solr_update_8008 in Search API Solr 8

Same name and namespace in other branches
  1. 8.3 search_api_solr.install \search_api_solr_update_8008()
  2. 8.2 search_api_solr.install \search_api_solr_update_8008()
  3. 4.x search_api_solr.install \search_api_solr_update_8008()

Remove obsolete settings in existing configs.

File

./search_api_solr.install, line 261

Code

function search_api_solr_update_8008() {
  $config_factory = \Drupal::configFactory();
  foreach ($config_factory
    ->listAll('search_api_solr.settings.') as $setting) {
    $config = $config_factory
      ->getEditable($setting);
    $data = $config
      ->getRawData();
    unset($data['autocomplete_max_occurrences']);
    unset($data['http_get_max_length']);
    $config
      ->setData($data);
    $config
      ->save(TRUE);
  }
}