protected function enrichFrequentSearchesInfo(array $frequentSearchTerms, $minimumSize, $maximumSize)
    {
        $frequentSearches = [];
        if (count($frequentSearchTerms)) {
            $maximumHits = max(array_values($frequentSearchTerms));
            $minimumHits = min(array_values($frequentSearchTerms));
            $spread = $maximumHits - $minimumHits;
            $step = ($spread == 0) ? 1 : ($maximumSize - $minimumSize) / $spread;

            foreach ($frequentSearchTerms as $term => $hits) {
                $size = round($minimumSize + (($hits - $minimumHits) * $step));
                $frequentSearches[] = ['q' => htmlspecialchars_decode($term), 'hits' => $hits, 'style' => 'font-size: ' . $size . 'px', 'class' => 'tx-solr-frequent-term-' . $size, 'size' => $size];
            }
        }

        return $frequentSearches;
    }
protected function enrichFrequentSearchesInfo(array $frequentSearchTerms, $minimumSize, $maximumSize)
    {
        $frequentSearches = [];
        if (count($frequentSearchTerms)) {
            $maximumHits = max(array_values($frequentSearchTerms));
            $minimumHits = min(array_values($frequentSearchTerms));
            $spread = $maximumHits - $minimumHits;
            $step = ($spread == 0) ? 1 : ($maximumSize - $minimumSize) / $spread;

            foreach ($frequentSearchTerms as $term => $hits) {
                $size = round($minimumSize + (($hits - $minimumHits) * $step));
                $frequentSearches[] = ['q' => htmlspecialchars_decode($term), 'hits' => $hits, 'style' => 'font-size: ' . $size . 'px', 'class' => 'tx-solr-frequent-term-' . $size, 'size' => $size];
            }
        }

        return $frequentSearches;
    }
protected function enrichFrequentSearchesInfo ( array $ frequentSearchTerms , $ minimumSize , $ maximumSize ) { $ frequentSearches = [ ] ; if ( count ( $ frequentSearchTerms ) ) { $ maximumHits = max ( array_values ( $ frequentSearchTerms ) ) ; $ minimumHits = min ( array_values ( $ frequentSearchTerms ) ) ; $ spread = $ maximumHits - $ minimumHits ; $ step = ( $ spread == 0 ) ? 1 : ( $ maximumSize - $ minimumSize ) / $ spread ; foreach ( $ frequentSearchTerms as $ term => $ hits ) { $ size = round ( $ minimumSize + ( ( $ hits - $ minimumHits ) * $ step ) ) ; $ frequentSearches [ ] = [ 'q' => htmlspecialchars_decode ( $ term ) , 'hits' => $ hits , 'style' => 'font-size: ' . $ size . 'px' , 'class' => 'tx-solr-frequent-term-' . $ size , 'size' => $ size ] ; } } return $ frequentSearches ; }
Enrich the frequentSearches

@param array Frequent search terms as array with terms as keys and hits as the value
@param integer $minimumSize
@param integer $maximumSize
@return array An array with content for the frequent terms markers
Enrich the frequentSearches