protected function getRequirementMet(AbstractFacet $facet, $requirement = []) {
        $selectedItemValues = $this->getSelectedItemValues($facet, $requirement['facet']);
        $csvActiveFacetItemValues = implode(', ', $selectedItemValues);
        $requirementValues = GeneralUtility::trimExplode(',', $requirement['values']);

        foreach ($requirementValues as $value) {
            $noFacetOptionSelectedRequirementMet = ($value === '__none' && empty($selectedItemValues));
            $anyFacetOptionSelectedRequirementMet = ($value === '__any' && !empty($selectedItemValues));

            if ($noFacetOptionSelectedRequirementMet || $anyFacetOptionSelectedRequirementMet || in_array($value, $selectedItemValues) || fnmatch($value, $csvActiveFacetItemValues)) {
                // when we find a single matching requirement we can exit and return true
                return true;
            }
        }

        return false;
    }
protected function getRequirementMet(AbstractFacet $facet, $requirement = []) {
        $selectedItemValues = $this->getSelectedItemValues($facet, $requirement['facet']);
        $csvActiveFacetItemValues = implode(', ', $selectedItemValues);
        $requirementValues = GeneralUtility::trimExplode(',', $requirement['values']);

        foreach ($requirementValues as $value) {
            $noFacetOptionSelectedRequirementMet = ($value === '__none' && empty($selectedItemValues));
            $anyFacetOptionSelectedRequirementMet = ($value === '__any' && !empty($selectedItemValues));

            if ($noFacetOptionSelectedRequirementMet || $anyFacetOptionSelectedRequirementMet || in_array($value, $selectedItemValues) || fnmatch($value, $csvActiveFacetItemValues)) {
                // when we find a single matching requirement we can exit and return true
                return true;
            }
        }

        return false;
    }
protected function getRequirementMet ( AbstractFacet $ facet , $ requirement = [ ] ) { $ selectedItemValues = $ this -> getSelectedItemValues ( $ facet , $ requirement [ 'facet' ] ) ; $ csvActiveFacetItemValues = implode ( ', ' , $ selectedItemValues ) ; $ requirementValues = GeneralUtility :: trimExplode ( ',' , $ requirement [ 'values' ] ) ; foreach ( $ requirementValues as $ value ) { $ noFacetOptionSelectedRequirementMet = ( $ value === '__none' && empty ( $ selectedItemValues ) ) ; $ anyFacetOptionSelectedRequirementMet = ( $ value === '__any' && ! empty ( $ selectedItemValues ) ) ; if ( $ noFacetOptionSelectedRequirementMet || $ anyFacetOptionSelectedRequirementMet || in_array ( $ value , $ selectedItemValues ) || fnmatch ( $ value , $ csvActiveFacetItemValues ) ) { // when we find a single matching requirement we can exit and return true return true ; } } return false ; }
Checks if a single requirement is met.

@param AbstractFacet $facet
@param array $requirement
@return bool
Checks if a single requirement is met .