public function UnsavedIndexConfiguration::getPropertyDefinitions in Search API 8
Retrieves the properties of one of this index's datasources.
Parameters
string|null $datasource_id: The ID of the datasource for which the properties should be retrieved. Or NULL to retrieve all datasource-independent properties.
Return value
\Drupal\Core\TypedData\DataDefinitionInterface[] The properties belonging to the given datasource that are available in this index, keyed by their property names (not the complete field IDs).
Throws
\Drupal\search_api\SearchApiException Thrown if the specified datasource isn't enabled for this index, or couldn't be loaded.
Overrides IndexInterface::getPropertyDefinitions
File
- src/
UnsavedIndexConfiguration.php, line 520
Class
- UnsavedIndexConfiguration
- Represents a configuration of an index that was not yet permanently saved.
Namespace
Drupal\search_apiCode
public function getPropertyDefinitions($datasource_id) {
return $this->entity
->getPropertyDefinitions($datasource_id);
}