public function TestDatasource::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/ src/ Plugin/ search_api/ datasource/ TestDatasource.php, line 26
Class
- TestDatasource
- Provides a datasource for testing purposes.
Namespace
Drupal\search_api_test\Plugin\search_api\datasourceCode
public function getItemId(ComplexDataInterface $item) {
return NULL;
}