You are here

public function UnsavedIndexConfiguration::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/UnsavedIndexConfiguration.php, line 285

Class

UnsavedIndexConfiguration
Represents a configuration of an index that was not yet permanently saved.

Namespace

Drupal\search_api

Code

public function setDatasources(array $datasources) {
  $this->entity
    ->setDatasources($datasources);
  return $this;
}