$result->
addFacet($criteriaPart);
} /**
* @param array<string, mixed> $buckets
*/
private function createFacet(Criteria
$criteria, array
$buckets): RadioFacetResult
{ $activeAverage = null;
$condition =
$criteria->
getCondition('vote_average'
);
if ($condition instanceof VoteAverageCondition
) { $activeAverage =
$condition->
getAverage();
} $values =
$this->
buildItems($buckets,
$activeAverage);
$facet =
$criteria->
getFacet('vote_average'
);
if ($facet instanceof VoteAverageFacet && !
empty($facet->
getLabel())) { $label =
$facet->
getLabel();
} else { $label =
$this->snippetManager
->
getNamespace('frontend/listing/facet_labels'
) ->
get('vote_average', 'Ranking'
);
}