You are here

public function Item::getDatasourceId in Search API 8

Returns the ID of this item's datasource.

Return value

string The plugin ID of this item's datasource.

Overrides ItemInterface::getDatasourceId

2 calls to Item::getDatasourceId()
Item::getDatasource in src/Item/Item.php
Returns the datasource of this item.
Item::getFields in src/Item/Item.php
Returns the item's fields.

File

src/Item/Item.php, line 149

Class

Item
Provides a default implementation for a search item.

Namespace

Drupal\search_api\Item

Code

public function getDatasourceId() {
  if (!isset($this->datasourceId)) {
    list($this->datasourceId) = Utility::splitCombinedId($this->itemId);
  }
  return $this->datasourceId;
}