You are here

public function SearchApiCombinedEntityDataSourceController::getItemId in Search API 7

Retrieves the unique ID of an item.

Parameters

mixed $item: An item of this controller's type.

Return value

mixed Either the unique ID of the item, or NULL if none is available.

Throws

SearchApiDataSourceException If any error state was encountered.

Overrides SearchApiAbstractDataSourceController::getItemId

File

includes/datasource_multiple.inc, line 121
Contains SearchApiCombinedEntityDataSourceController.

Class

SearchApiCombinedEntityDataSourceController
Provides a datasource for indexing multiple types of entities.

Code

public function getItemId($item) {
  return isset($item->item_id) ? $item->item_id : NULL;
}