Add is empty filter to search / api
[civicrm-core.git] / Civi / Api4 / Generic / Traits / ArrayQueryActionTrait.php
index fd515b9a4b712a71b0076538840fa55f6c5c825e..88c24a78c49de6dd1b33c1be23ec5c5246455e9d 100644 (file)
@@ -130,6 +130,10 @@ trait ArrayQueryActionTrait {
       case 'IS NOT NULL':
         return is_null($value) == ($operator == 'IS NULL');
 
+      case 'IS EMPTY':
+      case 'IS NOT EMPTY':
+        return empty($value) == ($operator == 'IS EMPTY');
+
       case '>':
         return $value > $expected;