protected function isFilterAppliable(QueryBuilder $queryBuilder, string $field): bool
    {
        $qbClone = clone $queryBuilder;

        try {
            $qbClone->andWhere($field.' IS NULL');

            // Generating SQL throws a QueryException if using wrong field/association
            $qbClone->getQuery()->getSQL();
        } catch (QueryException $e) {
            return false;
        }

        return true;
    }
protected function isFilterAppliable(QueryBuilder $queryBuilder, string $field): bool
    {
        $qbClone = clone $queryBuilder;

        try {
            $qbClone->andWhere($field.' IS NULL');

            // Generating SQL throws a QueryException if using wrong field/association
            $qbClone->getQuery()->getSQL();
        } catch (QueryException $e) {
            return false;
        }

        return true;
    }
protected function isFilterAppliable ( QueryBuilder $ queryBuilder , string $ field ) : bool { $ qbClone = clone $ queryBuilder ; try { $ qbClone -> andWhere ( $ field . ' IS NULL' ) ; // Generating SQL throws a QueryException if using wrong field/association $ qbClone -> getQuery ( ) -> getSQL ( ) ; } catch ( QueryException $ e ) { return false ; } return true ; }
Checks if filter is directly appliable on queryBuilder.

@param QueryBuilder $queryBuilder
@param string       $field

@return bool
Checks if filter is directly appliable on queryBuilder .