protected function buildFacetingParameters($allFacets, TypoScriptConfiguration $typoScriptConfiguration)
    {
        $facetParameters = [];

        foreach ($allFacets as $facetName => $facetConfiguration) {
            $facetName = substr($facetName, 0, -1);
            $type = isset($facetConfiguration['type']) ? $facetConfiguration['type'] : 'options';
            $facetParameterBuilder = $this->facetRegistry->getPackage($type)->getQueryBuilder();

            if (is_null($facetParameterBuilder)) {
                throw new \InvalidArgumentException('No query build configured for facet ' . htmlspecialchars($facetName));
            }

            $facetParameters = array_merge_recursive($facetParameters, $facetParameterBuilder->build($facetName, $typoScriptConfiguration));
        }

        return $facetParameters;
    }
protected function buildFacetingParameters($allFacets, TypoScriptConfiguration $typoScriptConfiguration)
    {
        $facetParameters = [];

        foreach ($allFacets as $facetName => $facetConfiguration) {
            $facetName = substr($facetName, 0, -1);
            $type = isset($facetConfiguration['type']) ? $facetConfiguration['type'] : 'options';
            $facetParameterBuilder = $this->facetRegistry->getPackage($type)->getQueryBuilder();

            if (is_null($facetParameterBuilder)) {
                throw new \InvalidArgumentException('No query build configured for facet ' . htmlspecialchars($facetName));
            }

            $facetParameters = array_merge_recursive($facetParameters, $facetParameterBuilder->build($facetName, $typoScriptConfiguration));
        }

        return $facetParameters;
    }
protected function buildFacetingParameters ( $ allFacets , TypoScriptConfiguration $ typoScriptConfiguration ) { $ facetParameters = [ ] ; foreach ( $ allFacets as $ facetName => $ facetConfiguration ) { $ facetName = substr ( $ facetName , 0 , - 1 ) ; $ type = isset ( $ facetConfiguration [ 'type' ] ) ? $ facetConfiguration [ 'type' ] : 'options' ; $ facetParameterBuilder = $ this -> facetRegistry -> getPackage ( $ type ) -> getQueryBuilder ( ) ; if ( is_null ( $ facetParameterBuilder ) ) { throw new \ InvalidArgumentException ( 'No query build configured for facet ' . htmlspecialchars ( $ facetName ) ) ; } $ facetParameters = array_merge_recursive ( $ facetParameters , $ facetParameterBuilder -> build ( $ facetName , $ typoScriptConfiguration ) ) ; } return $ facetParameters ; }
Delegates the parameter building to specialized functions depending on
the type of facet to add.
Delegates the parameter building to specialized functions depending on the type of facet to add .