Adds filter queries configured in TypoScript to $query.

@return $this
423977
protected function addTypoScriptFilters()
    {
        if (!empty($this->settings['additionalFilters'])) {
            foreach ($this->settings['additionalFilters'] as $key => $filterQuery) {
                $this->query->createFilterQuery('additionalFilter-'.$key)
                    ->setQuery($filterQuery);
            }
        }

        return $this;
    }
68485
protected function applyFilter($query)
    {
        if ($this->getModelInformation()->list->disable_filters) {
            return $this;
        }

        $filter = $this->makeFilter();

        if ($filter) {
            $filter->apply($query);
        }

        return $this;
    }
1032975
function addQuery() {
		if( !isset( $this->query ) ) {
			return FALSE;
		}

		$this->queries[] = $return = trim($this->query);

		unset( $this->query );

		return $return;
	}
225539
public function filtering()
    {
        $this->query->where(
                function ($query) {
            $globalKeyword = $this->setupKeyword($this->request->keyword());
            $queryBuilder  = $this->getQueryBuilder($query);
            if ($this->request->hasHeader('search-protection')) {
                $this->request->setSearchableColumnIndex($this->columns, $this->columnDef['filter']);
            }

            foreach ($this->request->searchableColumnIndex() as $index) {
                $columnName = $this->getColumnName($index);
                if ($this->isBlacklisted($columnName)) {
                    continue;
                }

                // check if custom column filtering is applied
                if (isset($this->columnDef['filter'][$columnName])) {
                    $columnDef         = $this->columnDef['filter'][$columnName];
                    // check if global search should be applied for the specific column
                    $applyGlobalSearch = count($columnDef['parameters']) == 0 || end($columnDef['parameters']) !== false;
                    if (!$applyGlobalSearch) {
                        continue;
                    }

                    if ($columnDef['method'] instanceof Closure) {
                        $whereQuery = $queryBuilder->newQuery();
                        call_user_func_array($columnDef['method'], [$whereQuery, $this->request->keyword()]);
                        $queryBuilder->addNestedWhereQuery($whereQuery, 'or');
                    } else {
                        $this->compileColumnQuery(
                                $queryBuilder, Helper::getOrMethod($columnDef['method']), $columnDef['parameters'], $columnName, $this->request->keyword()
                        );
                    }
                } else {
                    if (count(explode('.', $columnName)) > 1) {
                        $eagerLoads     = $this->getEagerLoads();
                        $parts          = explode('.', $columnName);
                        $relationColumn = array_pop($parts);
                        $relation       = implode('.', $parts);
                        if (in_array($relation, $eagerLoads)) {
                            $this->compileRelationSearch(
                                    $queryBuilder, $relation, $relationColumn, $globalKeyword
                            );
                        } else {
                            $this->compileGlobalSearch($queryBuilder, $columnName, $globalKeyword);
                        }
                    } else {
                        $this->compileGlobalSearch($queryBuilder, $columnName, $globalKeyword);
                    }
                }

                $this->isFilterApplied = true;
            }
        }
        );
    }
80386
public function addQuery($query)
    {
        $uri = clone $this;
        $query = is_array($query) ? http_build_query($query, PHP_QUERY_RFC3986) : $query;

        parse_str($query, $newQuery);

        if ( ! empty($uri->query)) {
            parse_str($uri->query, $oldQuery);
            $query = array_merge($oldQuery, $newQuery);
        } else {
            $query = $newQuery;
        }

        if (is_array($query)) {
            $uri->query = http_build_query($query, PHP_QUERY_RFC3986);
        }

        return $uri;
    }
486031
public function setQuery($query = null)
    {

        try {

            // need to return << true
            $this->validator->verify($query, ['isNotNull', 'isAcceptLength']);

            if (false === $this->exact) {
                $this->query = ['query' => '%' . $query . '%'];
            }
            else {
                $this->query = ['query' => $query];
            }

        }
        catch(ExceptionFactory $e) {
            echo $e->getMessage();
        }

        return $this;
    }
185132
public function addQueries($queries) {
        if(is_array($queries)) {
            foreach($queries as $query) {
                $this->addQuery($query);
            }

            new Logger('Queries added to the queue.', Logger::DEBUG, __CLASS__, __LINE__);
            return $this;
        }

        new Logger('Failed to add to the queue.', Logger::ERROR, __CLASS__, __LINE__);
        return $this;
    }
1005762
public function query($query)
    {
        \Assert\that($query)->string()->notEmpty();

        $this->query = $query;

        return $this;
    }
555357
private function applyQueryFilters()
    {
        if (is_array($this->queryFilter())) {
            $this->createQueryFilter();
        } else {
            $this->queryFilter();
        }

        $this->queryFilterRequest();
    }
663590
protected function initFilters($query)
    {
        if ($value = $this->getParamAdapter()->getValueOfFilter('name')) {
            $query->where($query->expr()->like('q.name', '?1'))->setParameter('1', '%' . $value . '%');
        }

        if ($value = $this->getParamAdapter()->getValueOfFilter('surname')) {
            $query->where($query->expr()->like('q.surname', '?1'))->setParameter('1', '%' . $value . '%');
        }

        if ($value = $this->getParamAdapter()->getValueOfFilter('doctrine')) {
            $query->where("q.name like '%".$value."%' OR q.surname like '%".$value."%' ");
            $expr = $query->expr();
            $query->where($expr->orX($expr->like('q.name', '?1'), $expr->like('q.surname', '?2')))
                ->setParameter('1', '%' . $value . '%')
                ->setParameter('2', '%' . $value . '%');
        }

        if ($value = $this->getParamAdapter()->getValueOfFilter('street')) {
            $query->where($query->expr()->like('q.street', '?1'))->setParameter('1', '%' . $value . '%');
        }

        if ($value = $this->getParamAdapter()->getValueOfFilter('city')) {
            $query->where($query->expr()->like('q.city', '?1'))->setParameter('1', '%' . $value . '%');
        }

        if ($value = $this->getParamAdapter()->getValueOfFilter('product')) {
            $query->where($query->expr()->like('q.product', '?1'))->setParameter('1', '%' . $value . '%');
        }
    }
1032298
public function addNestedWhereQuery($query, $boolean = 'and')
    {
        if (count($query->wheres)) {
            $type = 'Nested';

            $this->wheres[] = compact('type', 'query', 'boolean');

            $this->addBinding($query->getBindings(), 'where');
        }

        return $this;
    }
527211
public function enableQueryLog() {
		$this->loggingQueries = true;

		if ( ! $this->logger ) {
			$this->setLogger( new QueryLogger );
		}

		return $this;
	}
781880
public function addToQuery(&$query)
    {
        parent::addToQuery($query);

        foreach ($this->compositeDatabaseFields() as $field => $spec) {
            $table = $this->getTable();
            $key = $this->getName() . $field;
            if ($table) {
                $query->selectField("\"{$table}\".\"{$key}\"");
            } else {
                $query->selectField("\"{$key}\"");
            }
        }
    }
927165
public function addFilter($name, $query = array(), $tag = 'root_type')
	{
		if (is_array($query))
		{
			$string = $this->makeQueryString($query);
		}
		elseif (is_string($query))
		{
			$string = $query;
			if ($name == 'BoundingBox')
			{
				$this->query->setOptions(array('geo'=> true));
			}
		}
		$filterParams = array();
		$filterParams['key'] = $name;
		$filterParams['query'] = $string;
		if ($tag)
		{
			$filterParams['tag'] = $tag;
		}

		$this->query->createFilterQuery($filterParams);
		return $this;
	}
575245
public function apply(QueryObjectInterface $query)
    {
        if (empty($this->fields)) {
            return $this;
        }
        
        $query->where(
            [
                $this->getQueryCondition() => [
                    ':pattern' => "%{$this->pattern}%"
                ]
            ]
        );
        return $this;
    }
711215
protected function addFilters()
    {
        $search = static::$versionTransformer->getSearchValue();
        if ($search != '') {
            $this->addAllFilter($search);
        }
        $this->addColumnFilters();
        return $this;
    }
443198
function setQuery($query)
    {
        if ($query !== null) {
            $q = $this->getQuery();
            $q->with($q::parseWith($query));
        }

        return $this;
    }