hydrateAggregation example



        $aggregations = new AggregationResultCollection();

        foreach ($result['aggregations'] as $name => $aggResult) {
            $aggregation = $criteria->getAggregation($name);

            if (!$aggregation) {
                continue;
            }

            $hydration = $this->hydrateAggregation($aggregation$aggResult$context);
            if ($hydration) {
                $aggregations->add(
                    $hydration
                );
            }
        }

        return $aggregations;
    }

    private function hydrateAggregation(Aggregation $aggregation, array $result, Context $context): ?AggregationResult
    {
Home | Imprint | This part of the site doesn't use cookies.