You are here

public function Index::setDatasources in Search API 8

Sets this index's datasource plugins.

Parameters

\Drupal\search_api\Datasource\DatasourceInterface[] $datasources: An array of datasources.

Return value

$this

Overrides IndexInterface::setDatasources

File

src/Entity/Index.php, line 406

Class

Index
Defines the search index configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function setDatasources(array $datasources = NULL) {
  $this->datasourceInstances = $datasources;
  return $this;
}