getRootAliases()[0]; // Convert string 'true'/'false' to boolean $hasProject = filter_var($value, FILTER_VALIDATE_BOOLEAN); if ($hasProject) { // Filter for tasks WITH project $queryBuilder->andWhere(sprintf('%s.project IS NOT NULL', $alias)); } else { // Filter for tasks WITHOUT project $queryBuilder->andWhere(sprintf('%s.project IS NULL', $alias)); } } public function getDescription(string $resourceClass): array { return [ 'hasProject' => [ 'property' => 'hasProject', 'type' => Type::BUILTIN_TYPE_BOOL, 'required' => false, 'description' => 'Filter tasks by project existence (true = with project, false = without project)', 'openapi' => [ 'example' => 'true', 'allowReserved' => false, 'allowEmptyValue' => true, 'explode' => false, ], ], ]; } }