SearchResultSetTrait
Trait SearchResultSetTrait
Table of Contents
Properties
- $facets : ArrayData
- $highlight : array<string|int, mixed>|array<string|int, stdClass>
- $totalItems : int
Methods
- setFacets() : self
- Set the facets to build
- setHighlight() : SearchResultInterface
- Set the highlighted items
- setTotalItems() : self
- Set the total amount of results
- buildFacets() : ArrayData
- Build the given list of key-value pairs in to a SilverStripe useable array
Properties
$facets
protected
ArrayData
$facets
Facets
$highlight
protected
array<string|int, mixed>|array<string|int, stdClass>
$highlight
Highlighted items
$totalItems
protected
int
$totalItems
= 0
Total items in result
Methods
setFacets()
Set the facets to build
public
setFacets(stdClass|FacetSet $facets) : self
Parameters
- $facets : stdClass|FacetSet
Return values
selfsetHighlight()
Set the highlighted items
public
setHighlight(mixed $highlights) : SearchResultInterface
Parameters
- $highlights : mixed
Return values
SearchResultInterfacesetTotalItems()
Set the total amount of results
public
setTotalItems( $count) : self
Parameters
Return values
selfbuildFacets()
Build the given list of key-value pairs in to a SilverStripe useable array
protected
buildFacets(stdClass|FacetSet $facets) : ArrayData
Parameters
- $facets : stdClass|FacetSet