You are here

public function DatasourcePluginBase::getItemIds in Search API 8

Returns a list of IDs of items from this datasource.

Returns all items IDs by default. However, to avoid issues for large data sets, plugins should also implement a paging mechanism (the details of which are up to the datasource to decide) which guarantees that all item IDs can be retrieved by repeatedly calling this method with increasing values for $page (starting with 0) until NULL is returned.

Parameters

int|null $page: The zero-based page of IDs to retrieve, for the paging mechanism implemented by this datasource; or NULL to retrieve all items at once.

Return value

string[]|null An array with datasource-specific item IDs (that is, raw item IDs not prefixed with the datasource ID); or NULL if there are no more items for this and all following pages.

Overrides DatasourceInterface::getItemIds

1 method overrides DatasourcePluginBase::getItemIds()
ContentEntity::getItemIds in src/Plugin/search_api/datasource/ContentEntity.php
Returns a list of IDs of items from this datasource.

File

src/Datasource/DatasourcePluginBase.php, line 157

Class

DatasourcePluginBase
Defines a base class from which other datasources may extend.

Namespace

Drupal\search_api\Datasource

Code

public function getItemIds($page = NULL) {
  return NULL;
}