use Shopware\Bundle\SearchBundleDBAL\QueryBuilder;
class IsCustomerSinceConditionHandler implements ConditionHandlerInterface
{ public function supports(ConditionInterface
$condition) { return $condition instanceof IsCustomerSinceCondition;
} public function handle(ConditionInterface
$condition, QueryBuilder
$query) { $this->
addCondition($condition,
$query);
} private function addCondition(IsCustomerSinceCondition
$condition, QueryBuilder
$query): void
{ switch ($condition->
getOperator()) { case ConditionInterface::OPERATOR_EQ:
$query->
andWhere('customer.firstlogin = :IsCustomerSinceCondition'
);
break;
case ConditionInterface::OPERATOR_NEQ:
$query->
andWhere('customer.firstlogin != :IsCustomerSinceCondition'
);
break;