HasFacetListField
Builds the AQL filter fragment for an {@see Facet::LIST_FIELD} (and {@see Facet::LIST_FIELD_SORTED}) facet. Kept as a thin alias over the {@see HasFacetIn} primitive (operator defaults to `any.in`), preserving the historical type names. Composed into the model via {@see FacetTrait}.
Tags
Table of Contents
Methods
- prepareFacetListField() : string
- Prepares a list field facet (array membership, `ANY IN` by default).
- prepareFacetListFieldSorted() : string
- Prepares a sortable list field facet: same membership as {@see prepareFacetListField()}, plus a `SORT POSITION(...)` clause that ranks the matched documents by the order of the requested values (a value appearing first in the request sorts first).
Methods
prepareFacetListField()
Prepares a list field facet (array membership, `ANY IN` by default).
protected
prepareFacetListField(string $key, mixed $value, array<string|int, mixed> &$binds, array<string|int, mixed> $facet, string $doc[, bool $sortable = false ]) : string
Historical alias of HasFacetIn::prepareFacetIn() — see that method
for the full operator catalogue (any.in, all.in, none.in, …).
Parameters
- $key : string
- $value : mixed
- $binds : array<string|int, mixed>
- $facet : array<string|int, mixed>
- $doc : string
- $sortable : bool = false
Tags
Return values
stringprepareFacetListFieldSorted()
Prepares a sortable list field facet: same membership as {@see prepareFacetListField()}, plus a `SORT POSITION(...)` clause that ranks the matched documents by the order of the requested values (a value appearing first in the request sorts first).
protected
prepareFacetListFieldSorted(string $key, mixed $value, array<string|int, mixed> &$binds, array<string|int, mixed> $facet, string $doc) : string
Parameters
- $key : string
- $value : mixed
- $binds : array<string|int, mixed>
- $facet : array<string|int, mixed>
- $doc : string