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