You are here

public function SolrFieldType::addTextFile in Search API Solr 8.2

Adds a single text file to the Solr Field Type.

Parameters

string $name: The name of the text file.

string $content: The content of the text file.

Overrides SolrFieldTypeInterface::addTextFile

1 call to SolrFieldType::addTextFile()
SolrFieldType::setTextFiles in src/Entity/SolrFieldType.php
Adds multiple text files to the Solr Field Type.

File

src/Entity/SolrFieldType.php, line 392

Class

SolrFieldType
Defines the SolrFieldType entity.

Namespace

Drupal\search_api_solr\Entity

Code

public function addTextFile($name, $content) {
  $this->text_files[$name] = preg_replace('/\\R/u', "\n", $content);
}