You are here

public function ContentEntity::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 DatasourcePluginBase::getItemIds

File

src/Plugin/search_api/datasource/ContentEntity.php, line 735

Class

ContentEntity
Represents a datasource which exposes the content entities.

Namespace

Drupal\search_api\Plugin\search_api\datasource

Code

public function getItemIds($page = NULL) {
  return $this
    ->getPartialItemIds($page);
}