You are here

public function DatasourceInterface::getItemId in Search API 8

Retrieves the unique ID of an object from this datasource.

Parameters

\Drupal\Core\TypedData\ComplexDataInterface $item: An object from this datasource.

Return value

string|null The datasource-internal, unique ID of the item. Or NULL if the given item is no valid item of this datasource.

3 methods override DatasourceInterface::getItemId()
ContentEntity::getItemId in src/Plugin/search_api/datasource/ContentEntity.php
Retrieves the unique ID of an object from this datasource.
NoUi::getItemId in tests/search_api_test_no_ui/src/Plugin/search_api/datasource/NoUi.php
Retrieves the unique ID of an object from this datasource.
TestDatasource::getItemId in tests/search_api_test/src/Plugin/search_api/datasource/TestDatasource.php
Retrieves the unique ID of an object from this datasource.

File

src/Datasource/DatasourceInterface.php, line 79

Class

DatasourceInterface
Describes a source for search items.

Namespace

Drupal\search_api\Datasource

Code

public function getItemId(ComplexDataInterface $item);