You are here

public function WidgetDatasource::getItemId in Search API Solr 8.3

Same name and namespace in other branches
  1. 4.x tests/modules/search_api_solr_test/src/Plugin/search_api/datasource/WidgetDatasource.php \Drupal\search_api_solr_test\Plugin\search_api\datasource\WidgetDatasource::getItemId()

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/modules/search_api_solr_test/src/Plugin/search_api/datasource/WidgetDatasource.php, line 29

Class

WidgetDatasource
Represents a datasource which exposes widgets.

Namespace

Drupal\search_api_solr_test\Plugin\search_api\datasource

Code

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