public function filter(QueryBuilder $qb, $alias, $identifier, $search)
    {
        $qb->andWhere("LOWER({$alias}.{$identifier}) LIKE LOWER(:{$identifier})");
        $qb->setParameter($identifier, "%{$search}%");
    }
public function filter(QueryBuilder $qb, $alias, $identifier, $search)
    {
        $qb->andWhere("LOWER({$alias}.{$identifier}) LIKE LOWER(:{$identifier})");
        $qb->setParameter($identifier, "%{$search}%");
    }
public function filter ( QueryBuilder $ qb , $ alias , $ identifier , $ search ) { $ qb -> andWhere ( "LOWER({$alias}.{$identifier}) LIKE LOWER(:{$identifier})" ) ; $ qb -> setParameter ( $ identifier , "%{$search}%" ) ; }
Apply the filter in query builder.

@param QueryBuilder $qb         The query builder
@param string       $alias      The entity alias
@param string       $identifier The field identifier
@param string       $search     The search
Apply the filter in query builder .