You are here

public function TestBackend::supportsDataType in Search API 8

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

tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php, line 93

Class

TestBackend
Provides a dummy backend for testing purposes.

Namespace

Drupal\search_api_test\Plugin\search_api\backend

Code

public function supportsDataType($type) {
  if ($override = $this
    ->getMethodOverride(__FUNCTION__)) {
    return call_user_func($override, $this, $type);
  }
  return in_array($type, [
    'search_api_test',
    'search_api_test_altering',
  ]);
}