public function applyFilter(Criteria $criteria, $filter)
    {
        if (is_string($filter) && is_string($this->property)) {
            $criteria->andWhere(
                $criteria->expr()->contains($this->property, $filter)
            );
        }

        if (is_array($filter) && isset($filter[$this->searchKey])) {
            $criteria->andWhere(
                $criteria->expr()->contains($this->property, $filter[$this->searchKey])
            );
        }

        return $criteria;
    }
public function applyFilter(Criteria $criteria, $filter)
    {
        if (is_string($filter) && is_string($this->property)) {
            $criteria->andWhere(
                $criteria->expr()->contains($this->property, $filter)
            );
        }

        if (is_array($filter) && isset($filter[$this->searchKey])) {
            $criteria->andWhere(
                $criteria->expr()->contains($this->property, $filter[$this->searchKey])
            );
        }

        return $criteria;
    }
public function applyFilter ( Criteria $ criteria , $ filter ) { if ( is_string ( $ filter ) && is_string ( $ this -> property ) ) { $ criteria -> andWhere ( $ criteria -> expr ( ) -> contains ( $ this -> property , $ filter ) ) ; } if ( is_array ( $ filter ) && isset ( $ filter [ $ this -> searchKey ] ) ) { $ criteria -> andWhere ( $ criteria -> expr ( ) -> contains ( $ this -> property , $ filter [ $ this -> searchKey ] ) ) ; } return $ criteria ; }
Assign LIKE operator on property if query is string.

@param Criteria $criteria
@param          $filter

@return Criteria
Assign LIKE operator on property if query is string .