Entity/OverrideLeadRepository.php
protected function addCatchAllWhereClause($q, $filter)
    {
        $filterContainsPhone = $this->filterContainsPhone($filter); // might need to add a '+' so pass by reference
        $filterContainsEmail = $this->filterContainsEmail($filter);
        $filterContainsZip   = $this->filterContainsZip($filter);

        $columns = array_merge(
            $filterContainsPhone,
            $filterContainsEmail,
            $filterContainsZip
        );

        if (empty($columns)) {
            $columns = array_merge(
                [
                    'l.firstname',
                    'l.lastname',
                    'l.company',
                    'l.city',
                    'l.state',
                    'l.country',
                ],
                $this->availableSocialFields
            );
        }

        return $this->addStandardCatchAllWhereClause($q, $filter, $columns);
    }
protected function addCatchAllWhereClause($q, $filter)
    {
        $filterContainsPhone = $this->filterContainsPhone($filter); // might need to add a '+' so pass by reference
        $filterContainsEmail = $this->filterContainsEmail($filter);
        $filterContainsZip   = $this->filterContainsZip($filter);

        $columns = array_merge(
            $filterContainsPhone,
            $filterContainsEmail,
            $filterContainsZip
        );

        if (empty($columns)) {
            $columns = array_merge(
                [
                    'l.firstname',
                    'l.lastname',
                    'l.company',
                    'l.city',
                    'l.state',
                    'l.country',
                ],
                $this->availableSocialFields
            );
        }

        return $this->addStandardCatchAllWhereClause($q, $filter, $columns);
    }
protected function addCatchAllWhereClause ( $ q , $ filter ) { $ filterContainsPhone = $ this -> filterContainsPhone ( $ filter ) ; // might need to add a '+' so pass by reference $ filterContainsEmail = $ this -> filterContainsEmail ( $ filter ) ; $ filterContainsZip = $ this -> filterContainsZip ( $ filter ) ; $ columns = array_merge ( $ filterContainsPhone , $ filterContainsEmail , $ filterContainsZip ) ; if ( empty ( $ columns ) ) { $ columns = array_merge ( [ 'l.firstname' , 'l.lastname' , 'l.company' , 'l.city' , 'l.state' , 'l.country' , ] , $ this -> availableSocialFields ) ; } return $ this -> addStandardCatchAllWhereClause ( $ q , $ filter , $ columns ) ; }
Adds the "catch all" where clause to the QueryBuilder.

@param \Doctrine\ORM\QueryBuilder|\Doctrine\DBAL\Query\QueryBuilder $q
@param                                                              $filter

@return array
Adds the catch all where clause to the QueryBuilder .