public function Index::loadItem in Search API 8
Loads a single search object of this index.
Parameters
string $item_id: The internal item ID of the object, with datasource prefix.
Return value
\Drupal\Core\TypedData\ComplexDataInterface|null The loaded object, or NULL if the item does not exist.
Overrides IndexInterface::loadItem
File
- src/
Entity/ Index.php, line 856
Class
- Index
- Defines the search index configuration entity.
Namespace
Drupal\search_api\EntityCode
public function loadItem($item_id) {
$items = $this
->loadItemsMultiple([
$item_id,
]);
return $items ? reset($items) : NULL;
}