src/FrontendIntegration/FrontendFilter.php
protected function getFilters()
    {
        $filterOptions     = $this->getFrontendFilterOptions();
        $jumpToInformation = $this->objFilterConfig->getJumpTo();
        $filterSetting     = $this->objFilterConfig->getFilterCollection();
        $wantedNames       = $this->getWantedNames();

        $this->buildParameters(
            $other = new FilterUrl($jumpToInformation),
            $all   = new FilterUrl($jumpToInformation),
            $wantedNames
        );

        // DAMN Contao - we have to "mark" the keys in the Input class as used as we get an 404 otherwise.
        foreach ($wantedNames as $name) {
            if ($all->hasSlug($name)) {
                Input::get($name);
            }
        }

        $arrWidgets = $filterSetting->getParameterFilterWidgets(
            $all->getSlugParameters(),
            $jumpToInformation,
            $filterOptions
        );

        // If we have POST data, we need to redirect now.
        if (Input::post('FORM_SUBMIT') === $this->formId) {
            foreach ($wantedNames as $widgetName) {
                $filter = $arrWidgets[$widgetName];
                if (null !== $filter['urlvalue']) {
                    $other->setSlug($widgetName, $filter['urlvalue']);
                }
            }

            throw new RedirectResponseException($this->filterUrlBuilder->generate($other));
        }

        $renderedWidgets = [];

        // Render the widgets through the filter templates.
        foreach ($wantedNames as $strWidget) {
            $renderedWidgets[$strWidget] = $this->renderWidget($arrWidgets[$strWidget], $filterOptions);
        }

        // Return filter data.
        return [
            'action'     => $this->filterUrlBuilder->generate($other),
            'formid'     => $this->formId,
            'filters'    => $renderedWidgets,
            'submit'     => (
                $filterOptions->isAutoSubmit()
                    ? ''
                    : $GLOBALS['TL_LANG']['metamodels_frontendfilter']['submit']
                )
        ];
    }
protected function getFilters()
    {
        $filterOptions     = $this->getFrontendFilterOptions();
        $jumpToInformation = $this->objFilterConfig->getJumpTo();
        $filterSetting     = $this->objFilterConfig->getFilterCollection();
        $wantedNames       = $this->getWantedNames();

        $this->buildParameters(
            $other = new FilterUrl($jumpToInformation),
            $all   = new FilterUrl($jumpToInformation),
            $wantedNames
        );

        // DAMN Contao - we have to "mark" the keys in the Input class as used as we get an 404 otherwise.
        foreach ($wantedNames as $name) {
            if ($all->hasSlug($name)) {
                Input::get($name);
            }
        }

        $arrWidgets = $filterSetting->getParameterFilterWidgets(
            $all->getSlugParameters(),
            $jumpToInformation,
            $filterOptions
        );

        // If we have POST data, we need to redirect now.
        if (Input::post('FORM_SUBMIT') === $this->formId) {
            foreach ($wantedNames as $widgetName) {
                $filter = $arrWidgets[$widgetName];
                if (null !== $filter['urlvalue']) {
                    $other->setSlug($widgetName, $filter['urlvalue']);
                }
            }

            throw new RedirectResponseException($this->filterUrlBuilder->generate($other));
        }

        $renderedWidgets = [];

        // Render the widgets through the filter templates.
        foreach ($wantedNames as $strWidget) {
            $renderedWidgets[$strWidget] = $this->renderWidget($arrWidgets[$strWidget], $filterOptions);
        }

        // Return filter data.
        return [
            'action'     => $this->filterUrlBuilder->generate($other),
            'formid'     => $this->formId,
            'filters'    => $renderedWidgets,
            'submit'     => (
                $filterOptions->isAutoSubmit()
                    ? ''
                    : $GLOBALS['TL_LANG']['metamodels_frontendfilter']['submit']
                )
        ];
    }
Get the filters.

@return array

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)

@throws RedirectResponseException When there was a POST request and we have to reload the page.