public function SolrDocumentDefinition::getPropertyDefinitions in Search API Solr 8.3
Same name and namespace in other branches
- 8.2 src/TypedData/SolrDocumentDefinition.php \Drupal\search_api_solr\TypedData\SolrDocumentDefinition::getPropertyDefinitions()
- 4.x src/TypedData/SolrDocumentDefinition.php \Drupal\search_api_solr\TypedData\SolrDocumentDefinition::getPropertyDefinitions()
Gets an array of property definitions of contained properties.
Return value
\Drupal\Core\TypedData\DataDefinitionInterface[] An array of property definitions of contained properties, keyed by property name.
Overrides ComplexDataDefinitionBase::getPropertyDefinitions
File
- src/
TypedData/ SolrDocumentDefinition.php, line 68
Class
- SolrDocumentDefinition
- A typed data definition class for describing Solr documents.
Namespace
Drupal\search_api_solr\TypedDataCode
public function getPropertyDefinitions() {
if (!isset($this->propertyDefinitions)) {
$this->propertyDefinitions = [];
if (!empty($this
->getIndexId())) {
$index = Index::load($this
->getIndexId());
/** @var \Drupal\search_api_solr\SolrFieldManagerInterface $field_manager */
$field_manager = \Drupal::getContainer()
->get('solr_field.manager');
$this->propertyDefinitions = $field_manager
->getFieldDefinitions($index);
}
}
return $this->propertyDefinitions;
}