You are here

public function NoUi::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.

Overrides DatasourceInterface::getItemId

File

tests/search_api_test_no_ui/src/Plugin/search_api/datasource/NoUi.php, line 22

Class

NoUi
Provides a test datasource that should be hidden from the UI.

Namespace

Drupal\search_api_test_no_ui\Plugin\search_api\datasource

Code

public function getItemId(ComplexDataInterface $item) {
  return NULL;
}