You are here

public function Index::getDatasources in Search API 8

Retrieves this index's datasource plugins.

Return value

\Drupal\search_api\Datasource\DatasourceInterface[] The datasource plugins used by this index, keyed by plugin ID.

Overrides IndexInterface::getDatasources

9 calls to Index::getDatasources()
Index::addDatasource in src/Entity/Index.php
Adds a datasource to this index.
Index::getAllPlugins in src/Entity/Index.php
Retrieves all the plugins contained in this index.
Index::getDatasource in src/Entity/Index.php
Retrieves a specific datasource plugin for this index.
Index::getDatasourceIds in src/Entity/Index.php
Retrieves the IDs of all datasources enabled for this index.
Index::getEntityTypes in src/Entity/Index.php
Retrieves all entity types contained in this index.

... See full list

File

src/Entity/Index.php, line 336

Class

Index
Defines the search index configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function getDatasources() {
  if ($this->datasourceInstances === NULL) {
    $this->datasourceInstances = \Drupal::getContainer()
      ->get('search_api.plugin_helper')
      ->createDatasourcePlugins($this, array_keys($this->datasource_settings));
  }
  return $this->datasourceInstances;
}