public static function Utility::_modifySolrDynamicFieldName in Apache Solr Multilingual 8
2 calls to Utility::_modifySolrDynamicFieldName()
- Utility::getLanguageSpecificSolrDynamicFieldNameForSolrDynamicFieldName in src/
Utility/ Utility.php - Maps a solr field name to its language specific equivalent.
- Utility::getSolrDynamicFieldNameForLanguageSpecificSolrDynamicFieldName in src/
Utility/ Utility.php
File
- src/
Utility/ Utility.php, line 54 - Contains \Drupal\apachesolr_multilingual\Utility.
Class
Namespace
Drupal\apachesolr_multilingual\UtilityCode
public static function _modifySolrDynamicFieldName($field_name, $pattern, $replacement) {
$encoded = strpos($field_name, SearchApiSolrUtility::encodeSolrDynamicFieldName('_')) | strpos($field_name, SearchApiSolrUtility::encodeSolrDynamicFieldName(SEARCH_API_SOLR_MULTILINGUAL_LANGUAGE_SEPARATOR));
if ($encoded) {
$field_name = SearchApiSolrUtility::decodeSolrDynamicFieldName($field_name);
}
$field_name = preg_replace($pattern, $replacement, $field_name);
if ($encoded) {
$field_name = SearchApiSolrUtility::encodeSolrDynamicFieldName($field_name);
}
return $field_name;
}