/**
* @param FacetResultInterface[] $facets
*/
private function switchActivePriceFilter(array
$facets, Criteria
$criteria) { /** @var RangeFacetResult|null $facet */
$facet =
$this->
getFacetByName($facets, 'price'
);
if (!
$facet) { return;
} if (!
$criteria->
hasUserCondition('price'
)) { $facet->
setActive(false
);
return;
} /** @var PriceCondition $condition */
$condition =
$criteria->
getUserCondition('price'
);
$facet->
setActiveMin($condition->
getMinPrice());
$facet->
setActiveMax($condition->
getMaxPrice());
}