public function SearchApiEntityField::query in Search API 8
Add anything to the query that we might need to.
Overrides SearchApiFieldTrait::query
See also
\Drupal\views\Plugin\views\ViewsPluginInterface::query()
File
- src/
Plugin/ views/ field/ SearchApiEntityField.php, line 63
Class
- SearchApiEntityField
- Displays entity field data.
Namespace
Drupal\search_api\Plugin\views\fieldCode
public function query($use_groupby = FALSE) {
// If we're not using Field API field rendering, just use the query()
// implementation of the fallback handler.
if (!$this->options['field_rendering']) {
$this->fallbackHandler
->query();
return;
}
// If we do use Field API rendering, we need the entity object for the
// parent property.
$parent_path = $this
->getParentPath();
$property_path = $parent_path ? "{$parent_path}:_object" : '_object';
$combined_property_path = Utility::createCombinedId($this
->getDatasourceId(), $property_path);
$this
->addRetrievedProperty($combined_property_path);
}