protected function SearchApiFieldTrait::addRetrievedProperty in Search API 8
Adds a property to be retrieved.
Parameters
string $combined_property_path: The combined property path of the property that should be retrieved. "_object" can be used as a property name to indicate the loaded object is required.
string|null $field_id: (optional) The ID of the field corresponding to this property, if any.
Return value
$this
4 calls to SearchApiFieldTrait::addRetrievedProperty()
- SearchApiEntity::query in src/
Plugin/ views/ field/ SearchApiEntity.php - Add anything to the query that we might need to.
- SearchApiEntityField::query in src/
Plugin/ views/ field/ SearchApiEntityField.php - Add anything to the query that we might need to.
- SearchApiFieldTrait::query in src/
Plugin/ views/ field/ SearchApiFieldTrait.php - Add anything to the query that we might need to.
- SearchApiRenderedItem::query in src/
Plugin/ views/ field/ SearchApiRenderedItem.php - Add anything to the query that we might need to.
File
- src/
Plugin/ views/ field/ SearchApiFieldTrait.php, line 360
Class
- SearchApiFieldTrait
- Provides a trait to use for Search API Views field handlers.
Namespace
Drupal\search_api\Plugin\views\fieldCode
protected function addRetrievedProperty($combined_property_path, $field_id = NULL) {
if ($field_id) {
$this
->getQuery()
->addRetrievedFieldValue($field_id);
}
list($datasource_id, $property_path) = Utility::splitCombinedId($combined_property_path);
$this->retrievedProperties[$datasource_id][$property_path] = $combined_property_path;
return $this;
}