diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index e5576fd1ed12cab1b284fbbcfb546d6f0ecc1b5f..5062e9579f58a9074f5bbb359c5ee6f1b8d1b2c1 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -917,10 +917,13 @@ class Params implements ServiceLocatorAwareInterface * Get a user-friendly string to describe the provided facet field. * * @param string $field Facet field name. + * @param string $value Facet value. * * @return string Human-readable description of field. + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getFacetLabel($field) + public function getFacetLabel($field, $value = null) { if (!isset($this->facetConfig[$field]) && isset($this->facetAliases[$field]) @@ -987,7 +990,7 @@ class Params implements ServiceLocatorAwareInterface if (!isset($skipList[$field]) || !in_array($value, $skipList[$field]) ) { - $facetLabel = $this->getFacetLabel($field); + $facetLabel = $this->getFacetLabel($field, $value); $list[$facetLabel][] = $this->formatFilterListEntry( $field, $value, $operator, $translate ); diff --git a/module/VuFind/src/VuFind/Search/EDS/Params.php b/module/VuFind/src/VuFind/Search/EDS/Params.php index dc8db7345f28a7a8b5f04de9e5b919d3c105f7bb..bd13a8dde6c9dabe7505992088905294f1ca428a 100644 --- a/module/VuFind/src/VuFind/Search/EDS/Params.php +++ b/module/VuFind/src/VuFind/Search/EDS/Params.php @@ -314,10 +314,13 @@ class Params extends \VuFind\Search\Base\Params * Get a user-friendly string to describe the provided facet field. * * @param string $field Facet field name. + * @param string $value Facet value. * * @return string Human-readable description of field. + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getFacetLabel($field) + public function getFacetLabel($field, $value = null) { //Also store Limiter/Search Mode IDs/Values in the config file $facetId = $field; diff --git a/module/VuFind/src/VuFind/Search/Summon/Params.php b/module/VuFind/src/VuFind/Search/Summon/Params.php index 661ff9f3be0384071f36813b76546a6c30ff5562..217fa24235a06d5d4fc5327f5b9c6dd582088f62 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Params.php +++ b/module/VuFind/src/VuFind/Search/Summon/Params.php @@ -107,10 +107,13 @@ class Params extends \VuFind\Search\Base\Params * Get a user-friendly string to describe the provided facet field. * * @param string $field Facet field name. + * @param string $value Facet value. * * @return string Human-readable description of field. + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getFacetLabel($field) + public function getFacetLabel($field, $value = null) { // The default use of "Other" for undefined facets doesn't work well with // checkbox facets -- we'll use field names as the default within the Summon