src/Model/Filter/AbstractFilter.php
public function apply(Query $query, array $data)
    {
        if ($this->_applicable($data)) {
            $field = $this->config('field');
            if (is_string($field) && (strpos($field, '.') === false)) {
                $field = $query->repository()->alias() . '.' . $field;
            }

            return $this->_buildQuery($query, $field, $this->_value($data), $data);
        }

        return $query;
    }
public function apply(Query $query, array $data)
    {
        if ($this->_applicable($data)) {
            $field = $this->config('field');
            if (is_string($field) && (strpos($field, '.') === false)) {
                $field = $query->repository()->alias() . '.' . $field;
            }

            return $this->_buildQuery($query, $field, $this->_value($data), $data);
        }

        return $query;
    }
public function apply ( Query $ query , array $ data ) { if ( $ this -> _applicable ( $ data ) ) { $ field = $ this -> config ( 'field' ) ; if ( is_string ( $ field ) && ( strpos ( $ field , '.' ) === false ) ) { $ field = $ query -> repository ( ) -> alias ( ) . '.' . $ field ; } return $ this -> _buildQuery ( $ query , $ field , $ this -> _value ( $ data ) , $ data ) ; } return $ query ; }
Apply filter to query based on filter data

@param  \Cake\ORM\Query $query Query.
@param array $data Filters values.
@return \Cake\ORM\Query
Apply filter to query based on filter data