Sets the Filters.

@param array|sting $filters the filters

@return self
637
public function setFilters($filters)
    {
        if (! is_array($filters))
            $filters = [$filters];

        $this->filters = array_unique(array_merge($this->filters, $filters));

        return $this;
    }
1296060
public function addFiltersWithOrToTable(iterable $filters): self
    {
        $addWith = $this->expr()->orX();
        $this->applyFilters($addWith, $this->getTableName(), $filters);
        $addWith->count() <= 0 ?: $this->andWhere($addWith);

        return $this;
    }
1250090
public function filterAll(array $filters)
    {
        $filterList = [];
        foreach ($filters as $key => $value) {
            $filterList[] = $key . ':' . $value;
        }

        $result = $this->connection()->get($this->getEndpoint(), ['filter' => implode(',', $filterList)], true);

        return $this->collectionFromResult($result);
    }
1094087
public function setFilters($filters = [])
    {
        foreach ($filters as $field => $rules) {
            if ($field === 'fullSearch') {
                $this->addFilter($field, $rules, null);
                continue;
            }

            if (is_a($rules, MultiFullTextFilter::class)) {
                $this->addFilter($field, $rules, null);
                continue;
            }

            foreach ($rules as $operator => $value) {
                if (!in_array($operator, $this->availableFilters) || (empty($value) && $value != '0')) {
                    continue;
                }
                $this->addFilter($field, $value, $operator);
            }
        }

        return $this;
    }
1284206
public function setRules( $rules )
    {
        $this->rules = array();

        foreach ( $rules as $rule )
        {
            $this->addRule( $rule );
        }

        return $this;
    }
1052485
public function filter(array $filters)
	{
		foreach ($filters as $filter) {
			if ($filter->isValueSet()) {
				if ($filter->hasConditionCallback()) {
					Callback::invokeArgs(
						$filter->getConditionCallback(),
						[$this->data_source, $filter->getValue()]
					);
				} else {
					if ($filter instanceof Filter\FilterText) {
						$this->applyFilterText($filter);
					} elseif ($filter instanceof Filter\FilterMultiSelect) {
						$this->applyFilterMultiSelect($filter);
					} elseif ($filter instanceof Filter\FilterSelect) {
						$this->applyFilterSelect($filter);
					} elseif ($filter instanceof Filter\FilterDate) {
						$this->applyFilterDate($filter);
					} elseif ($filter instanceof Filter\FilterDateRange) {
						$this->applyFilterDateRange($filter);
					} elseif ($filter instanceof Filter\FilterRange) {
						$this->applyFilterRange($filter);
					}
				}
			}
		}

		return $this;
	}
1282813
public function addFiltersWithAndToAlias(iterable $filters): self
    {
        $addWith = $this->expr()->andX();
        $this->applyFilters($addWith, $this->getAlias(), $filters);
        $addWith->count() <= 0 ?: $this->andWhere($addWith);

        return $this;
    }
345056
public function setFilters(array $filters)
    {
        if (empty($filters)) {
            return $this->clearFilters();
        }

        session()->put($this->getSessionKey(static::TYPE_FILTERS), $filters);

        return $this;
    }
322239
public function rawFilter($filters = [])
    {
        $filters = is_array($filters) ? $filters : func_get_args();

        foreach ($filters as $filter) {
            $this->filters['raw'][] = $filter;
        }

        return $this;
    }
184397
public function setOperators(array $operators): self
    {
        foreach ($operators as $operator) {
            $this->validateOperator($operator);
        }
        $this->operators = $operators;

        return $this;
    }
453721
private function setAttributeRules(array $rules): self
    {
        assert($this->debugCheckIndexesExist($rules));

        $this->attributeRules = $rules;

        return $this;
    }
996036
public function setRules(array $rules)
    {
        foreach ($rules as $key => $values) {

            if ((is_array($values) === true && empty($values) === false) || is_callable($values)) {
                $this->rules[$key] = $values;
            } else {
                $this->rules[$key] = trim($values);
            }
        }

        return $this;
    }
203414
public function setFilters($filters)
    {

        if (!is_array($filters)) {

            $this->clearFilters();
            foreach(explode('|', $filters) as $filter) {
                // searching for optional params
                $params = [];
                if (strpos($filter, ':')) {
                    list($filter, $params) = explode(':', $filter);
                    $params = (array) explode(',', $params);
                }

                $this->addFilter($filter, null, ...$params);
            }
        } else {
            $this->filters = $filters;
        }

        return $this;
    }
656978
public function setFilterParameters($filterParameters)
    {
        if (!is_string($filterParameters)) {
            $this->filterParameters = json_encode($filterParameters);
        } else {
            $this->filterParameters = $filterParameters;
        }

        return $this;
    }
1166458
public function filters(array $filters)
    {

        foreach ($filters as $name => $options) {
            $this->filter($name, $options);
        }

        return $this;
    }
148423
public function setFilter(FilterQuery $filter)
    {
        $this->result = array_merge($this->result, $filter->toArray()['bool']);

        return $this;
    }
1230967
function (filters) {
      if (!this.isArray(filters)) {
        throw 'Invalid filters type supplied. Expected Array.';
      }

      for (var i = 0; i < filters.length; i++) {
        this.enableFilter(filters[i]);
      }

      return this;
    }