You are here

function search_api_solr_multilingual_post_update_replace_solr_field_type_el2 in Search API Multilingual Solr Search 8

Re-installs Greek Solr Field Type.

File

./search_api_solr_multilingual.post_update.php, line 37

Code

function search_api_solr_multilingual_post_update_replace_solr_field_type_el2() {
  $storage = \Drupal::entityTypeManager()
    ->getStorage('solr_field_type');
  if ($field_type = $storage
    ->load('text_el_4_5_0')) {
    $storage
      ->delete([
      $field_type,
    ]);
  }

  /** @var \Drupal\Core\Config\ConfigInstallerInterface $config_installer */
  $config_installer = \Drupal::service('config.installer');
  $config_installer
    ->installDefaultConfig('module', 'search_api_solr_multilingual');
  $restrict_by_dependency = [
    'module' => 'search_api_solr_multilingual',
  ];
  $config_installer
    ->installOptionalConfig(NULL, $restrict_by_dependency);
}