getFacetByName example



        return null;
    }

    /** * @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');

        
Home | Imprint | This part of the site doesn't use cookies.