RecordCollectionInterface
extends
Countable, Iterator
in
Interface for backend responses to a search() operation.
Tags
Table of Contents
- add() : void
- Add a record to the collection.
- first() : RecordInterface|null
- Return first record in collection.
- getErrors() : array<string|int, mixed>
- Return any errors.
- getFacets() : array<string|int, mixed>
- Return available facets.
- getOffset() : int
- Return offset in the total search result set.
- getRecords() : array<string|int, mixed>
- Return records.
- getSourceIdentifier() : string
- Return the source backend identifier.
- getTotal() : int
- Return total number of records found.
- setSourceIdentifier() : void
- Set the source backend identifier.
- setSourceIdentifiers() : void
- Set the source backend identifiers.
Methods
add()
Add a record to the collection.
public
add(RecordInterface $record) : void
Parameters
- $record : RecordInterface
-
Record to add
Return values
void —first()
Return first record in collection.
public
first() : RecordInterface|null
Return values
RecordInterface|null —getErrors()
Return any errors.
public
getErrors() : array<string|int, mixed>
Each error can be a translatable string or an array that the Flashmessages view helper understands.
Return values
array<string|int, mixed> —getFacets()
Return available facets.
public
getFacets() : array<string|int, mixed>
Returns an associative array with the field name as key. The value is an associative array of available facets for the field, indexed by facet value.
Return values
array<string|int, mixed> —getOffset()
Return offset in the total search result set.
public
getOffset() : int
Return values
int —getRecords()
Return records.
public
getRecords() : array<string|int, mixed>
Return values
array<string|int, mixed> —getSourceIdentifier()
Return the source backend identifier.
public
getSourceIdentifier() : string
Return values
string —getTotal()
Return total number of records found.
public
getTotal() : int
Return values
int —setSourceIdentifier()
Set the source backend identifier.
public
setSourceIdentifier(string $identifier) : void
Parameters
- $identifier : string
-
Backend identifier
Tags
Return values
void —setSourceIdentifiers()
Set the source backend identifiers.
public
setSourceIdentifiers(string $identifier[, string $searchBackendId = '' ]) : void
Parameters
- $identifier : string
-
Record source identifier
- $searchBackendId : string = ''
-
Search backend identifier (if different from $recordSourceId)