return $condition instanceof OrderedOnDeviceCondition;
} public function handle(ConditionInterface
$condition, QueryBuilder
$query) { $this->
addCondition($condition,
$query);
} private function addCondition(OrderedOnDeviceCondition
$condition, QueryBuilder
$query): void
{ $wheres =
[];
foreach ($condition->
getDevices() as $i =>
$id) { $wheres[] = 'customer.ordered_on_devices LIKE :device' .
$i;
$query->
setParameter(':device' .
$i, '%|' .
$id . '|%'
);
} $query->
andWhere(implode(' OR ',
$wheres));
}}