protected function getFiltersByFacetName($resultParameters, $allFacets)
    {
        // format for filter URL parameter:
        // tx_solr[filter]=$facetName0:$facetValue0,$facetName1:$facetValue1,$facetName2:$facetValue2
        $filters = array_map('urldecode', $resultParameters['filter']);
        // $filters look like ['name:value1','name:value2','fieldname2:foo']
        $configuredFacets = $this->getFacetNamesWithConfiguredField($allFacets);
        // first group the filters by facetName - so that we can
        // decide later whether we need to do AND or OR for multiple
        // filters for a certain facet/field
        // $filtersByFacetName look like ['name' =>  ['value1', 'value2'], 'fieldname2' => ['foo']]
        $filtersByFacetName = [];
        foreach ($filters as $filter) {
            // only split by the first colon to allow using colons in the filter value itself
            list($filterFacetName, $filterValue) = explode(':', $filter, 2);
            if (in_array($filterFacetName, $configuredFacets)) {
                $filtersByFacetName[$filterFacetName][] = $filterValue;
            }
        }

        return $filtersByFacetName;
    }
protected function getFiltersByFacetName($resultParameters, $allFacets)
    {
        // format for filter URL parameter:
        // tx_solr[filter]=$facetName0:$facetValue0,$facetName1:$facetValue1,$facetName2:$facetValue2
        $filters = array_map('urldecode', $resultParameters['filter']);
        // $filters look like ['name:value1','name:value2','fieldname2:foo']
        $configuredFacets = $this->getFacetNamesWithConfiguredField($allFacets);
        // first group the filters by facetName - so that we can
        // decide later whether we need to do AND or OR for multiple
        // filters for a certain facet/field
        // $filtersByFacetName look like ['name' =>  ['value1', 'value2'], 'fieldname2' => ['foo']]
        $filtersByFacetName = [];
        foreach ($filters as $filter) {
            // only split by the first colon to allow using colons in the filter value itself
            list($filterFacetName, $filterValue) = explode(':', $filter, 2);
            if (in_array($filterFacetName, $configuredFacets)) {
                $filtersByFacetName[$filterFacetName][] = $filterValue;
            }
        }

        return $filtersByFacetName;
    }
protected function getFiltersByFacetName ( $ resultParameters , $ allFacets ) { // format for filter URL parameter: // tx_solr[filter]=$facetName0:$facetValue0,$facetName1:$facetValue1,$facetName2:$facetValue2 $ filters = array_map ( 'urldecode' , $ resultParameters [ 'filter' ] ) ; // $filters look like ['name:value1','name:value2','fieldname2:foo'] $ configuredFacets = $ this -> getFacetNamesWithConfiguredField ( $ allFacets ) ; // first group the filters by facetName - so that we can // decide later whether we need to do AND or OR for multiple // filters for a certain facet/field // $filtersByFacetName look like ['name' =>  ['value1', 'value2'], 'fieldname2' => ['foo']] $ filtersByFacetName = [ ] ; foreach ( $ filters as $ filter ) { // only split by the first colon to allow using colons in the filter value itself list ( $ filterFacetName , $ filterValue ) = explode ( ':' , $ filter , 2 ) ; if ( in_array ( $ filterFacetName , $ configuredFacets ) ) { $ filtersByFacetName [ $ filterFacetName ] [ ] = $ filterValue ; } } return $ filtersByFacetName ; }
Groups facet values by facet name.

@param array $resultParameters
@param array $allFacets
@return array
Groups facet values by facet name .