public function IndexInterface::addDatasource in Search API 8
Adds a datasource to this index.
An existing datasource with the same ID will be replaced.
Parameters
\Drupal\search_api\Datasource\DatasourceInterface $datasource: The datasource to be added.
Return value
$this
2 methods override IndexInterface::addDatasource()
- Index::addDatasource in src/
Entity/ Index.php - Adds a datasource to this index.
- UnsavedIndexConfiguration::addDatasource in src/
UnsavedIndexConfiguration.php - Adds a datasource to this index.
File
- src/
IndexInterface.php, line 169
Class
- IndexInterface
- Defines the interface for index entities.
Namespace
Drupal\search_apiCode
public function addDatasource(DatasourceInterface $datasource);