You are here

public function SolrFieldDefinition::getSchema in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/TypedData/SolrFieldDefinition.php \Drupal\search_api_solr\TypedData\SolrFieldDefinition::getSchema()
  2. 8.2 src/TypedData/SolrFieldDefinition.php \Drupal\search_api_solr\TypedData\SolrFieldDefinition::getSchema()

Gets an array of field properties.

Return value

string[] An array of properties describing the solr schema. The array keys are single-character codes, and the values are human-readable labels.

Overrides SolrFieldDefinitionInterface::getSchema

13 calls to SolrFieldDefinition::getSchema()
SolrFieldDefinition::isBinary in src/TypedData/SolrFieldDefinition.php
Determines whether this field is binary.
SolrFieldDefinition::isCompressed in src/TypedData/SolrFieldDefinition.php
Determines whether this field is compressed.
SolrFieldDefinition::isIndexed in src/TypedData/SolrFieldDefinition.php
Determines whether this field is indexed.
SolrFieldDefinition::isLazy in src/TypedData/SolrFieldDefinition.php
Determines whether this field is lazy-loaded.
SolrFieldDefinition::isMultivalued in src/TypedData/SolrFieldDefinition.php
Determines whether this field is multi-valued.

... See full list

File

src/TypedData/SolrFieldDefinition.php, line 71

Class

SolrFieldDefinition
Defines a class for Solr field definitions.

Namespace

Drupal\search_api_solr\TypedData

Code

public function getSchema() {
  if (!isset($this->schema)) {
    foreach (str_split(str_replace('-', '', $this->definition['schema'])) as $key) {
      $this->schema[$key] = isset(self::$schemaLabels[$key]) ? self::$schemaLabels[$key] : $key;
    }
  }
  return $this->schema;
}