Moved the getCondition method to the utils module and rename it to getFilterCondition