protected function AggregatedFieldProperty::getAvailableProperties in Search API 8
Retrieve all properties available on the index.
The properties will be keyed by combined ID, which is a combination of the datasource ID and the property path. This is used internally in this class to easily identify any property on the index.
Parameters
\Drupal\search_api\IndexInterface $index: The search index.
Return value
\Drupal\Core\TypedData\DataDefinitionInterface[] All the properties available on the index, keyed by combined ID.
See also
\Drupal\search_api\Utility::createCombinedId()
2 calls to AggregatedFieldProperty::getAvailableProperties()
- AggregatedFieldProperty::buildConfigurationForm in src/
Plugin/ search_api/ processor/ Property/ AggregatedFieldProperty.php - Constructs a configuration form for a field based on this property.
- AggregatedFieldProperty::getFieldDescription in src/
Plugin/ search_api/ processor/ Property/ AggregatedFieldProperty.php - Retrieves the description for a field based on this property.
File
- src/
Plugin/ search_api/ processor/ Property/ AggregatedFieldProperty.php, line 227
Class
- AggregatedFieldProperty
- Defines an "aggregated field" property.
Namespace
Drupal\search_api\Plugin\search_api\processor\PropertyCode
protected function getAvailableProperties(IndexInterface $index) {
$properties = [];
$datasource_ids = $index
->getDatasourceIds();
$datasource_ids[] = NULL;
foreach ($datasource_ids as $datasource_id) {
foreach ($index
->getPropertyDefinitions($datasource_id) as $property_path => $property) {
$properties[Utility::createCombinedId($datasource_id, $property_path)] = $property;
}
}
return $properties;
}