return $condition instanceof NotOrderedProductCondition;
} public function handle(ConditionInterface
$condition, QueryBuilder
$query): void
{ $this->
addCondition($condition,
$query);
} private function addCondition(NotOrderedProductCondition
$condition, QueryBuilder
$query): void
{ $likes =
[];
foreach ($condition->
getNumbers() as $i =>
$number) { $likes[] = 'ordered_products LIKE :product' .
$i;
} $query->
where('customernumber NOT IN
(
SELECT customernumber
FROM s_customer_search_index
WHERE ' .
implode(' OR ',
$likes) . '
)'
);
foreach ($condition->
getNumbers() as $i =>
$number) {