lib/components/db/ActiveQuery.php
public function buildContainsQuery($queryString)
    {
        $queryString = trim($queryString);
        if (empty($queryString)) {
            return [];
        }
        $modelClass = $this->modelClass;
        $queryTerms = $modelClass::prepareSearchTerms($queryString);
        $searchFields = $modelClass::parseSearchFields($modelClass::searchFields());
        $localSearchFieldsRaw = $searchFields['local'];
        $localSearchFields = [];
        foreach ($localSearchFieldsRaw as $fieldGroup) {
            $localSearchFields = array_merge($localSearchFields, $fieldGroup);
        }
        $method = 'single';
        if ($method === 'group') {
            $query = ['condition' => 'AND', 'rules' => []];
            foreach ($queryTerms as $queryTerm) {
                $subquery = ['condition' => 'OR', 'rules' => []];
                foreach ($localSearchFields as $searchField) {
                    $subquery['rules'][] = [
                        'field' => $searchField,
                        'operator' => 'contains',
                        'value' => $queryTerm,
                    ];
                }
                $query['rules'][] = $subquery;
            }
        } else {
            $query = ['condition' => 'OR', 'rules' => []];
            foreach ($queryTerms as $queryTerm) {
                foreach ($localSearchFields as $searchField) {
                    $query['rules'][] = [
                        'field' => $searchField,
                        'operator' => 'contains',
                        'value' => $queryTerm,
                    ];
                }
            }
        }

        return $query;
    }
public function buildContainsQuery($queryString)
    {
        $queryString = trim($queryString);
        if (empty($queryString)) {
            return [];
        }
        $modelClass = $this->modelClass;
        $queryTerms = $modelClass::prepareSearchTerms($queryString);
        $searchFields = $modelClass::parseSearchFields($modelClass::searchFields());
        $localSearchFieldsRaw = $searchFields['local'];
        $localSearchFields = [];
        foreach ($localSearchFieldsRaw as $fieldGroup) {
            $localSearchFields = array_merge($localSearchFields, $fieldGroup);
        }
        $method = 'single';
        if ($method === 'group') {
            $query = ['condition' => 'AND', 'rules' => []];
            foreach ($queryTerms as $queryTerm) {
                $subquery = ['condition' => 'OR', 'rules' => []];
                foreach ($localSearchFields as $searchField) {
                    $subquery['rules'][] = [
                        'field' => $searchField,
                        'operator' => 'contains',
                        'value' => $queryTerm,
                    ];
                }
                $query['rules'][] = $subquery;
            }
        } else {
            $query = ['condition' => 'OR', 'rules' => []];
            foreach ($queryTerms as $queryTerm) {
                foreach ($localSearchFields as $searchField) {
                    $query['rules'][] = [
                        'field' => $searchField,
                        'operator' => 'contains',
                        'value' => $queryTerm,
                    ];
                }
            }
        }

        return $query;
    }
[[@doctodo method_description:buildContainsQuery]].

@param [[@doctodo param_type:queryString]] $queryString [[@doctodo param_description:queryString]]

@return [[@doctodo return_type:buildContainsQuery]] [[@doctodo return_description:buildContainsQuery]]