public function __construct(Container
$container) { $this->container =
$container;
} /**
* @return BoolQuery
*/
public function build(array
$conditions, Criteria
$criteria, ShopContextInterface
$context) { $search =
new EsSearch();
$handlerRegistry =
$this->container->
get(HandlerRegistry::
class);
if (!
$handlerRegistry instanceof HandlerRegistry
) { throw new RuntimeException(sprintf('%s is missing', HandlerRegistry::
class));
} foreach ($conditions as $condition) { $handler =
$handlerRegistry->
getHandler($condition);
if ($handler instanceof PartialConditionHandlerInterface
) { $handler->
handleFilter($condition,
$criteria,
$search,
$context);
}