Fill array of Filter\Filter[] with values from $this->filter persistent parameter
Fill array of Column\Column[] with values from $this->sort   persistent parameter
@return Filter\Filter[] $this->filters === Filter\Filter[]
554132
public function assembleFilters()
	{
		foreach ($this->filter as $key => $value) {
			if (!isset($this->filters[$key])) {
				$this->deleteSessionData($key);

				continue;
			}

			if (is_array($value) || $value instanceof \Traversable) {
				if (!ArraysHelper::testEmpty($value)) {
					$this->filters[$key]->setValue($value);
				}
			} else {
				if ($value !== '' && $value !== null) {
					$this->filters[$key]->setValue($value);
				}
			}
		}

		foreach ($this->columns as $key => $column) {
			if (isset($this->sort[$key])) {
				$column->setSort($this->sort);
			}
		}

		/**
		 * Invoke possible events
		 */
		if (!empty($this->onFiltersAssabled)) {
			@trigger_error('onFiltersAssabled is deprecated, use onFiltersAssembled instead', E_USER_DEPRECATED);
			$this->onFiltersAssabled($this->filters);
		}

		$this->onFiltersAssembled($this->filters);
		return $this->filters;
	}
595253
protected function filters()
    {
        $where = $this->initFilters();

        $gf = $this->globalFilter();
        $where .= (empty($where) ? $gf : (empty($gf) ? '' : ' AND '.$gf));

        $gf = $this->individualColumnFilters();
        $where .= (empty($where) ? $gf : (empty($gf) ? '' : ' AND '.$gf));

        return $where;
    }
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;
	}
89814
public function getFiltersArray()
    {
        if ($this->_filtersArray === null) {
            $this->_filtersArray = $this->getQueryCacheHelper((new Query())->from('{{%admin_storage_filter}}')->select(['id', 'identifier', 'name'])->indexBy('identifier')->orderBy(['name' => SORT_ASC]), self::CACHE_KEY_FILTER);
        }

        return $this->_filtersArray;
    }
175286
public function getFiltering(): array
    {
        if ($this->filtering === null) {
            $this->filtering = $this->setFiltering();
        }

        return $this->filtering;
    }
815266
public function getFilters()
    {
        return [
            new Twig_SimpleFilter('add_filter_value', [$this->urlBuilder, 'addFilterValue']),
            new Twig_SimpleFilter('remove_filter_value', [$this->urlBuilder, 'removeFilterValue']),
            new Twig_SimpleFilter('remove_price_range_filter', [$this->urlBuilder, 'removePriceRangeFilter']),
            new Twig_SimpleFilter('add_prev_page', [$this->urlBuilder, 'addPrevPage']),
            new Twig_SimpleFilter('add_page', [$this->urlBuilder, 'addPage']),
            new Twig_SimpleFilter('add_next_page', [$this->urlBuilder, 'addNextPage']),
            new Twig_SimpleFilter('add_sort_by', [$this->urlBuilder, 'addSortBy']),
        ];
    }
1279825
public function getFiltering()
    {
        if ($this->filtering === null) {
            $this->filtering = new Filtering($this);
        }
        return $this->filtering;
    }
851785
public function setFilters($filters = []) {
		if ($filters) {
			foreach ($filters as $key => $value) {
				$this->setFilter($key, $value);
			}
		}

		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;
    }
52825
public function getCurrentFilters()
    {
        $sessionValues = $this->session->get(Configuration::SESSION_PREFIX.'filters', null);

        return $sessionValues !== null ? $sessionValues : $this->getDefaultFilters();
    }
227327
public function get_filters() {
        $filterkeys = [
            ASSIGN_FILTER_SUBMITTED,
            ASSIGN_FILTER_NOT_SUBMITTED,
            ASSIGN_FILTER_REQUIRE_GRADING,
            ASSIGN_FILTER_GRANTED_EXTENSION
        ];

        $current = get_user_preferences('assign_filter', '');

        $filters = [];
        // First is always "no filter" option.
        array_push($filters, [
            'key' => 'none',
            'name' => get_string('filternone', 'assign'),
            'active' => ($current == '')
        ]);

        foreach ($filterkeys as $key) {
            array_push($filters, [
                'key' => $key,
                'name' => get_string('filter' . $key, 'assign'),
                'active' => ($current == $key)
            ]);
        }
        return $filters;
    }
1121510
public function toArray(): array
    {
        return array_map(function (array $sortBy) {
            if (
                isset($sortBy['filter']) &&
                ($sortBy['filter'] instanceof Filter)
            ) {
                $sortBy['filter'] = $sortBy['filter']->toArray();
            }

            if (
                isset($sortBy['coordinate']) &&
                $sortBy['coordinate'] instanceof Coordinate
            ) {
                $sortBy['coordinate'] = $sortBy['coordinate']->toArray();
            }

            return $sortBy;
        }, $this->sortsBy);
    }
698124
public function getFilterOptionsForDcGeneral()
    {
        if (!$this->isFilterOptionRetrievingPossible(null)) {
            return [];
        }

        $originalLanguage       = $GLOBALS['TL_LANGUAGE'];
        $GLOBALS['TL_LANGUAGE'] = $this->getMetaModel()->getActiveLanguage();

        $filter = $this->getSelectMetaModel()->getEmptyFilter();

        $this->buildFilterRulesForFilterSetting($filter);

        $objItems = $this->getSelectMetaModel()->findByFilter(
            $filter,
            $this->getSortingColumn(),
            0,
            0,
            'ASC',
            [$this->getValueColumn(), $this->getIdColumn()]
        );

        $GLOBALS['TL_LANGUAGE'] = $originalLanguage;

        return $this->convertItemsToFilterOptions($objItems, $this->getValueColumn(), $this->getIdColumn());
    }
1139611
public function filter()
    {
        $opts = func_get_args();
        $callable = array_shift($opts);

        // allow for a false call
        if (!is_callable($callable)) {
            return $this;
        }

        array_unshift($opts, $this);
        return call_user_func_array($callable, $opts);
    }
257744
protected function getFilters()
    {
        $filters = array_diff(get_class_methods($this), [
            '__construct', '__call', 'apply', 'getFilters', 'getSearchables', 'getSortables', 'buildSearch', 'buildSql'
        ]);
        $filters = array_merge($filters, array_map(function ($searchable, $key) {
            return is_array($searchable) ? $key : $searchable;
        }, $this->searchables, array_keys($this->searchables)));

        return array_only($this->request->query(), $filters);
    }
817395
public function filter()
    {
        if ($this->get('disabled')) {
            return $this;
        }

        $filter = $this->getFilter();

        if (is_callable($filter)) {
            $this->value = call_user_func($filter, $this->value);
        } else {
            $this->value = $filter->clean($this->value);
        }

        return $this;
    }
1068097
public function set($columnFilters)
    {
        if (! is_array($columnFilters)) {
            $columnFilters = func_get_args();
        }

        $this->columnFilters = [];

        foreach ($columnFilters as $filter) {
            $this->push($filter);
        }

        return $this;
    }