You are here

public static function Utility::completeTextFileName in Search API Solr 8.2

Same name and namespace in other branches
  1. 8.3 src/Utility/Utility.php \Drupal\search_api_solr\Utility\Utility::completeTextFileName()
  2. 4.x src/Utility/Utility.php \Drupal\search_api_solr\Utility\Utility::completeTextFileName()

Returns the complete file name for a text file.

Parameters

string $text_file_name:

SolrFieldTypeInterface $solr_field_type:

Return value

string

3 calls to Utility::completeTextFileName()
SolrFieldTypeExportForm::form in src/Form/SolrFieldTypeExportForm.php
Gets the actual form array to be built.
SolrFieldTypeForm::form in src/Form/SolrFieldTypeForm.php
Gets the actual form array to be built.
SolrFieldTypeListBuilder::getConfigFiles in src/Controller/SolrFieldTypeListBuilder.php

File

src/Utility/Utility.php, line 458

Class

Utility
Provides various helper functions for Solr backends.

Namespace

Drupal\search_api_solr\Utility

Code

public static function completeTextFileName(string $text_file_name, SolrFieldTypeInterface $solr_field_type) {
  if ($custom_code = $solr_field_type
    ->getCustomCode()) {
    $text_file_name .= '_' . $custom_code;
  }
  return $text_file_name . '_' . $solr_field_type
    ->getFieldTypeLanguageCode() . '.txt';
}