search_api_solr_multilingual.install in Search API Multilingual Solr Search 8.3
File
search_api_solr_multilingual.install
View source
<?php
function search_api_solr_multilingual_update_dependencies() {
$dependencies['search_api_solr'][8201] = [
'search_api_solr_multilingual' => 8300,
];
$dependencies['search_api_solr_multilingual'][8300] = [
'search_api_solr' => 8200,
];
return $dependencies;
}
function search_api_solr_multilingual_install() {
$module_installer = \Drupal::service('module_installer');
$module_installer
->uninstall([
'search_api_solr_multilingual',
]);
throw new \Exception('search_api_solr_multilingual must not be installed again! It became part of search_api_solr itself!');
}
function search_api_solr_multilingual_update_helper_get_backend_configs() {
module_load_install('search_api_solr');
return search_api_solr_update_helper_get_backend_configs('search_api_solr_multilingual');
}
function search_api_solr_multilingual_update_helper_save_backend_config($server_name, array $backend_config, $trusted_data = TRUE) {
module_load_install('search_api_solr');
search_api_solr_update_helper_save_backend_config($server_name, $backend_config, $trusted_data);
}
function search_api_solr_multilingual_update_8001() {
}
function search_api_solr_multilingual_update_8002() {
foreach (search_api_solr_multilingual_update_helper_get_backend_configs() as $server_name => $backend_config) {
$backend_config['field_type_language_code'] = $backend_config['langcode'];
$backend_config['langcode'] = 'en';
search_api_solr_multilingual_update_helper_save_backend_config($server_name, $backend_config);
}
}
function search_api_solr_multilingual_update_8003() {
foreach (search_api_solr_multilingual_update_helper_get_backend_configs() as $server_name => $backend_config) {
$backend_config['sasm_domain'] = 'generic';
search_api_solr_multilingual_update_helper_save_backend_config($server_name, $backend_config);
}
}
function search_api_solr_multilingual_update_8004() {
foreach (search_api_solr_multilingual_update_helper_get_backend_configs() as $server_name => $backend_config) {
$backend_config['sasm_search_page_include_language_independent'] = FALSE;
search_api_solr_multilingual_update_helper_save_backend_config($server_name, $backend_config);
}
}
function search_api_solr_multilingual_update_8300() {
$config_factory = \Drupal::configFactory();
foreach ($config_factory
->listAll('search_api_solr_multilingual') as $config_name) {
$config_factory
->getEditable($config_name)
->delete();
}
}