PrepareFacetCountsTrait
Prepares the list of facet dimensions for which per-value bucket counts are computed alongside the document list (see {@see \oihana\arango\models\traits\documents\DocumentsFacetCountsTrait::facetCounts()}).
Driven by ?facetCounts=key1,key2 (CSV). Each key must be a configured facet
(Arango::FACETS); unknown keys are ignored at the model layer.
Tags
Table of Contents
Methods
- prepareFacetCounts() : array<string|int, mixed>|null
- Resolves the facet-count dimensions for a list query.
Methods
prepareFacetCounts()
Resolves the facet-count dimensions for a list query.
protected
prepareFacetCounts(ServerRequestInterface|null $request[, array<string|int, mixed> $args = [] ][, array<string|int, mixed>|null &$params = null ]) : array<string|int, mixed>|null
Parameters
- $request : ServerRequestInterface|null
-
The HTTP request.
- $args : array<string|int, mixed> = []
-
Predefined options (
$args[Arango::FACET_COUNTS]as base). - $params : array<string|int, mixed>|null = null
-
Echoed query params, populated by reference.
Return values
array<string|int, mixed>|null —The list of facet keys, or null when none requested.