Returns a list of all filters that are exposed by this extension.

@return \Twig_SimpleFilter[]
163182
public function getFilters()
    {
        $parser = \Parsedown::instance();
        $translator = $this->translator;
        $routeRenderer = $this->routeRenderer;

        return array(
            'markdown' => new \Twig_SimpleFilter(
                'markdown',
                function ($value) use ($parser) {
                    return $parser->text($value);
                }
            ),
            'trans' => new \Twig_SimpleFilter(
                'trans',
                function ($value, $context) use ($translator) {
                    if (!$context) {
                        $context = array();
                    }

                    return vsprintf($translator->translate($value), $context);
                }
            ),
            'route' => new \Twig_SimpleFilter(
                'route',
                function ($value, $presentation = 'normal') use ($routeRenderer) {
                    return $routeRenderer->render($value, $presentation);
                }
            ),
            'sort' => new \Twig_SimpleFilter(
                'sort_*',
                function ($direction, $collection) {
                    if (!$collection instanceof Collection) {
                        return $collection;
                    }

                    $iterator = $collection->getIterator();
                    $iterator->uasort(
                        function ($a, $b) use ($direction) {
                            $aElem = strtolower($a->getName());
                            $bElem = strtolower($b->getName());
                            if ($aElem === $bElem) {
                                return 0;
                            }
                            if ($direction === 'asc' && $aElem > $bElem || $direction === 'desc' && $aElem < $bElem) {
                                return 1;
                            }

                            return -1;
                        }
                    );

                    return $iterator;
                }
            ),
        );
    }
622889
private function getQueryFilters()
    {
        $queries = [];

        foreach ($this->queryProviders as $queryProvider) {
            $queries[] = $queryProvider->getQuery();
        }

        return array_filter($queries);
    }
630935
public function getFilters()
    {
        $filters = &gplcart_static('module.file_manager.filter.list');

        if (isset($filters)) {
            return $filters;
        }

        $filters = (array) gplcart_config_get(__DIR__ . '/../config/filters.php');
        $this->hook->attach('module.file_manager.filter.list', $filters, $this);
        return $filters;
    }
1310284
protected function get_filters_as_booleans() {
        $filters = [
            BLOCK_TIMELINE_FILTER_BY_NONE => false,
            BLOCK_TIMELINE_FILTER_BY_OVERDUE => false,
            BLOCK_TIMELINE_FILTER_BY_7_DAYS => false,
            BLOCK_TIMELINE_FILTER_BY_30_DAYS => false,
            BLOCK_TIMELINE_FILTER_BY_3_MONTHS => false,
            BLOCK_TIMELINE_FILTER_BY_6_MONTHS => false
        ];

        // Set the selected filter to true.
        $filters[$this->filter] = true;

        return $filters;
    }
125404
public function getFilterFormats() {
    $options = [];
    $formats = filter_formats($this->currentUser);
    foreach ($formats as $format) {
      $options[$format->id()] = $format->label();
    }
    return $options;
  }
396091
public function getAvailableFilters()
    {
        if (!$this->defaultFilter) {
            $this->defaultFilter = $this->app->make(StandardFilter::class, [
                $this,
                self::IDENTIFIER,
                t('User Deactivated'),
                'userdeactivatednotification'
            ]);
        }

        return [$this->defaultFilter];
    }
1300143
protected function getFilters()
    {
        $filters = [];
        foreach ($this->filters as $alias => $opt) {
            if (!is_array($opt)) {
                $opt = ['filter' => $opt];
            }
            if (!isset($opt['filter'])) {
                throw new InvalidConfigException('Option "filter" required for filter alias "' . $alias . '".');
            }
            if (!isset($this->classmap[$opt['filter']])) {
                throw new InvalidConfigException('Unknown filter "' . $opt['filter'] . '".');
            }
            if (isset($opt['options'])) {
                if (!is_array($opt['options'])) {
                    throw new InvalidConfigException('Expects option "options" to be array, ' .
                        gettype($opt['options']) . ' given in filter "' . $opt['filter'] . '".');
                }
                $filters[$alias] = $this->createFilter($opt['filter'], $opt['options']);
            }
            else {
                $filters[$alias] = $this->createFilter($opt['filter']);
            }
        }
        return $filters;
    }
396757
public static function getEnabledFilters($om)
    {
        $filters = [];

        if ($om instanceof EntityManagerInterface) {
            $enabledFilters = $om->getFilters()->getEnabledFilters();

            foreach ($enabledFilters as $name => $filter) {
                if (!$filter instanceof EnableFilterInterface
                        || ($filter instanceof EnableFilterInterface && $filter->isEnabled())) {
                    $filters[$name] = $filter;
                }
            }
        }

        return $filters;
    }
379336
public function getFunctions(): array
    {
        return [
            new TwigFunction('elementExists', function ($name) {
                return $this->view->elementExists($name);
            }),
            new TwigFunction('getVars', function () {
                return $this->view->getVars();
            }),
            new TwigFunction('get', function ($var, $default = null) {
                return $this->view->get($var, $default);
            }),
        ];
    }
840257
public function getFilters()
    {
        return [
            new \Twig_SimpleFilter('isEager', function($stuff) {
                return AgnosticFetchHelper::isEager($stuff);
            }),
            new \Twig_SimpleFilter('all', function($stuff) {
                return AgnosticFetchHelper::all($stuff);
            }),
            new \Twig_SimpleFilter('one', function($stuff) {
                return AgnosticFetchHelper::one($stuff);
            }),
            new \Twig_SimpleFilter('nth', function($stuff, $n) {
                return AgnosticFetchHelper::nth($stuff, $n);
            }),
            new \Twig_SimpleFilter('ids', function($stuff) {
                return AgnosticFetchHelper::ids($stuff);
            }),
            new \Twig_SimpleFilter('count', function($stuff) {
                return AgnosticFetchHelper::count($stuff);
            }),
        ];
    }
766393
private function getFilters()
    {
        $filters = new Collection;

        foreach ($this->getCachedPermissionGroups() as $group) {
            /** @var  \Arcanesoft\Auth\Models\PermissionsGroup  $group */
            $filters->push([
                'name'   => $group->name,
                'params' => [$group->hashed_id],
            ]);
        }

        // Custom Permission group
        //----------------------------------
        if (Permission::where('group_id', 0)->count()) {
            $filters->push([
                'name'   => trans('auth::permission-groups.custom'),
                'params' => [hasher()->encode(0)],
            ]);
        }

        return $filters;
    }
821171
public function getTagFilters()
    {
        if ($this->tagFilters === ['none']) {
            $result = null;
        } elseif ($this->tagFilters === ['all']) {
            $result = [];
        } else {
            $result = $this->tagFilters;
        }

        return $result;
    }
877898
public function safeFilters()
    {
        $filters = [];

        foreach ($this->filters() as $filterName => $query) {
            $filters[str_slug($filterName)] = $filterName;
        }

        return $filters;
    }
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);
    }
1368734
protected function _getFilterFields()
    {
        $filterFields = [];

        foreach ($this->controller->filterFields as $field => $options) {
            if (isset($options['actions']) &&
                is_array($options['actions']) &&
                in_array($this->action, $options['actions'])
            ) {
                $filterFields[$field] = $options;
            }
        }

        return $filterFields;
    }
818556
public function getAllFilters()
    {
        $filters = [];

        foreach ($this->filters as $filter) {
            $filters = array_merge($filters, $filter->getAllFilters());
        }

        return $filters;
    }
1369115
private function filter()
    {
        if ($this->allowsFilter()) {
            if ($this->hasFilters()) {
                $tmp = [];
                foreach ($this->filters as $filter) {
                    // check, if it is a "forbidden" query parameter
                    if ($this->isExcludedParameter($filter['key'])) {
                        continue;
                    }
                    $tmp[] = $filter;
                }

                $this->filters = $tmp;

                return $this->operator->filter($this->filters);
            }
        }
    }