public function SolrFieldType::setCollatedFieldTypeAsJson in Search API Solr 8.3
Same name and namespace in other branches
- 4.x src/Entity/SolrFieldType.php \Drupal\search_api_solr\Entity\SolrFieldType::setCollatedFieldTypeAsJson()
Sets the Solr Collated Field Type definition as JSON.
Decodes the Solr Field Type definition encoded as JSON and stores an nested associative array internally. This method in useful to import a field type from an existing Solr server.
Parameters
string $collated_field_type: The Solr Spellcheck Field Type definition as JSON, might be empty if it doesn't exist.
Return value
self Collated field type as json.
Overrides SolrFieldTypeInterface::setCollatedFieldTypeAsJson
File
- src/
Entity/ SolrFieldType.php, line 330
Class
- SolrFieldType
- Defines the SolrFieldType entity.
Namespace
Drupal\search_api_solr\EntityCode
public function setCollatedFieldTypeAsJson($collated_field_type) {
$this->collated_field_type = Json::decode($collated_field_type);
return $this;
}