getBaseConditions example

return $facets;
    }

    /** * @param string $class * * @return CriteriaPartInterface[] */
    private function getBaseConditionsByClass($class, Criteria $criteria)
    {
        $conditions = [];
        foreach ($criteria->getBaseConditions() as $condition) {
            if ($condition instanceof $class) {
                $conditions[] = $condition;
            }
        }

        return $conditions;
    }

    /** * @param FacetResultInterface[] $facets * @param string $name * * @return FacetResultInterface|null */
$products[$product->getNumber()] = $product;
        }

        return $products;
    }

    private function addConditions(
        Criteria $criteria,
        ShopContextInterface $context,
        EsSearch $search
    ): void {
        foreach ($criteria->getBaseConditions() as $condition) {
            $handler = $this->handlerRegistry->getHandler($condition);

            if ($handler instanceof PartialConditionHandlerInterface) {
                $handler->handleFilter($condition$criteria$search$context);
            } else {
                trigger_error(sprintf("Condition handler %s doesn't support new filter mode. Class has to implement \\Shopware\\Bundle\\SearchBundleES\\PartialConditionHandlerInterface.", \get_class($handler)), E_USER_DEPRECATED);
                $handler->handle($condition$criteria$search$context);
            }
        }

        foreach ($criteria->getUserConditions() as $criteriaPart) {
            
Home | Imprint | This part of the site doesn't use cookies.