trait ElasticsearchViewsHandlerTrait in Elasticsearch Connector 8.2
Same name and namespace in other branches
- 8.7 modules/elasticsearch_connector_views/src/Plugin/views/ElasticsearchViewsHandlerTrait.php \Drupal\elasticsearch_connector_views\Plugin\views\ElasticsearchViewsHandlerTrait
- 8.5 modules/elasticsearch_connector_views/src/Plugin/views/ElasticsearchViewsHandlerTrait.php \Drupal\elasticsearch_connector_views\Plugin\views\ElasticsearchViewsHandlerTrait
- 8.6 modules/elasticsearch_connector_views/src/Plugin/views/ElasticsearchViewsHandlerTrait.php \Drupal\elasticsearch_connector_views\Plugin\views\ElasticsearchViewsHandlerTrait
Provides a trait to use for Search API Views handlers.
Hierarchy
- trait \Drupal\elasticsearch_connector_views\Plugin\views\ElasticsearchViewsHandlerTrait
1 file declares its use of ElasticsearchViewsHandlerTrait
- ElasticsearchViewsFieldTrait.php in modules/
elasticsearch_connector_views/ src/ Plugin/ views/ field/ ElasticsearchViewsFieldTrait.php
File
- modules/
elasticsearch_connector_views/ src/ Plugin/ views/ ElasticsearchViewsHandlerTrait.php, line 8
Namespace
Drupal\elasticsearch_connector_views\Plugin\viewsView source
trait ElasticsearchViewsHandlerTrait {
/**
* Overrides the Views handlers' ensureMyTable() method.
*
* This is done since adding a table to a Search API query is neither
* necessary nor possible, but we still want to stay as compatible as possible
* to the default SQL query plugin.
*/
public function ensureMyTable() {
}
/**
* Determines the entity type used by this handler.
*
* If this handler uses a relationship, the base class of the relationship is
* taken into account.
*
* @return string
* The machine name of the entity type.
*
* @see \Drupal\views\Plugin\views\HandlerBase::getEntityType()
*/
public function getEntityType() {
if (isset($this->definition['entity_type'])) {
return $this->definition['entity_type'];
}
return parent::getEntityType();
}
/**
* Returns the active search index.
*
* @return string
* The index to use with this filter, or NULL if none could be
* loaded.
*/
protected function getIndex() {
// TODO: Implement.
return NULL;
}
/**
* Retrieves the query plugin.
*/
public function getQuery() {
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ElasticsearchViewsHandlerTrait:: |
public | function | Overrides the Views handlers' ensureMyTable() method. | |
ElasticsearchViewsHandlerTrait:: |
public | function | Determines the entity type used by this handler. | |
ElasticsearchViewsHandlerTrait:: |
protected | function | Returns the active search index. | |
ElasticsearchViewsHandlerTrait:: |
public | function | Retrieves the query plugin. |