You are here

public function ItemInterface::getDatasource in Search API 8

Returns the datasource of this item.

Return value

\Drupal\search_api\Datasource\DatasourceInterface The datasource to which this item belongs.

Throws

\Drupal\search_api\SearchApiException Thrown if the item's datasource wasn't set before and couldn't be loaded.

1 method overrides ItemInterface::getDatasource()
Item::getDatasource in src/Item/Item.php
Returns the datasource of this item.

File

src/Item/ItemInterface.php, line 66

Class

ItemInterface
Represents a search item being indexed or returned as a search result.

Namespace

Drupal\search_api\Item

Code

public function getDatasource();