You are here

public function IndexInterface::isValidDatasource in Search API 8

Determines whether the given datasource ID is valid for this index.

The general contract of this method is that it should return TRUE if, and only if, a call to getDatasource() with the same ID would not result in an exception.

Parameters

string $datasource_id: A datasource plugin ID.

Return value

bool TRUE if the datasource with the given ID is enabled for this index and can be loaded. FALSE otherwise.

2 methods override IndexInterface::isValidDatasource()
Index::isValidDatasource in src/Entity/Index.php
Determines whether the given datasource ID is valid for this index.
UnsavedIndexConfiguration::isValidDatasource in src/UnsavedIndexConfiguration.php
Determines whether the given datasource ID is valid for this index.

File

src/IndexInterface.php, line 142

Class

IndexInterface
Defines the interface for index entities.

Namespace

Drupal\search_api

Code

public function isValidDatasource($datasource_id);