You are here

public function SearchApiElasticsearchBackend::supportsDataType in Elasticsearch Connector 8.7

Same name and namespace in other branches
  1. 8.5 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::supportsDataType()
  2. 8.6 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::supportsDataType()

Determines whether the backend supports a given add-on data type.

Parameters

string $type: The identifier of the add-on data type.

Return value

bool TRUE if the backend supports that data type.

Overrides BackendPluginBase::supportsDataType

File

src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php, line 1172

Class

SearchApiElasticsearchBackend
Elasticsearch Search API Backend definition.

Namespace

Drupal\elasticsearch_connector\Plugin\search_api\backend

Code

public function supportsDataType($type) {
  $data_types = $this
    ->getSupportedDataTypes();
  return in_array($type, $data_types);
}