function hook_search_api_solr_config_files_alter in Search API Solr 8.3
Same name and namespace in other branches
- 8.2 search_api_solr.api.php \hook_search_api_solr_config_files_alter()
- 4.x search_api_solr.api.php \hook_search_api_solr_config_files_alter()
Alter the newly assembled Solr configuration files.
Parameters
string[] $files: Array of config files keyed by file names.
string $lucene_match_version: Lucene (Solr) minor version string.
string $server_id: Optional Search API server id. Will be set in most cases but might be empty when the config generation is triggered via UI or drush.
1 function implements hook_search_api_solr_config_files_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- search_api_solr_test_search_api_solr_config_files_alter in tests/
modules/ search_api_solr_test/ search_api_solr_test.module - Implements hook_search_api_solr_config_files_alter().
1 invocation of hook_search_api_solr_config_files_alter()
- SolrConfigSetController::getConfigFiles in src/
Controller/ SolrConfigSetController.php - Returns the configuration files names and content.
File
- ./
search_api_solr.api.php, line 245 - Hooks provided by the Search API Solr search module.
Code
function hook_search_api_solr_config_files_alter(array &$files, string $lucene_match_version, string $server_id = '') {
$files['solrconfig_extra.xml'] .= "<!-- Append additional stuff -->\n";
// If you want to modify the existing XML files we recommend to use PHP's DOM
// API.
}