public function IndexInterface::getDatasource in Search API 8
Retrieves a specific datasource plugin for this index.
Parameters
string $datasource_id: The ID of the datasource plugin to return.
Return value
\Drupal\search_api\Datasource\DatasourceInterface The datasource plugin with the given ID.
Throws
\Drupal\search_api\SearchApiException Thrown if the specified datasource isn't enabled for this index, or couldn't be loaded.
2 methods override IndexInterface::getDatasource()
- Index::getDatasource in src/
Entity/ Index.php - Retrieves a specific datasource plugin for this index.
- UnsavedIndexConfiguration::getDatasource in src/
UnsavedIndexConfiguration.php - Retrieves a specific datasource plugin for this index.
File
- src/
IndexInterface.php, line 157
Class
- IndexInterface
- Defines the interface for index entities.
Namespace
Drupal\search_apiCode
public function getDatasource($datasource_id);