SilverStripe Search

SearchResultSetTrait

Trait SearchResultSetTrait

Getters for search results to keep the class clean.

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

$highlight

protected array<string|int, mixed>|array<string|int, stdClass> $highlight

Highlighted items

Methods

setFacets()

Set the facets to build

public setFacets(stdClass|FacetSet $facets) : self
Parameters
$facets : stdClass|FacetSet
Return values
self

setTotalItems()

Set the total amount of results

public setTotalItems( $count) : self
Parameters
$count :
Return values
self

buildFacets()

Build the given list of key-value pairs in to a SilverStripe useable array

protected buildFacets(stdClass|FacetSet $facets) : ArrayData
Parameters
$facets : stdClass|FacetSet
Return values
ArrayData

        
On this page

Search results