You are here

public function FacetapiAdapter::getMappedValue in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 plugins/facetapi/adapter.inc \FacetapiAdapter::getMappedValue()
  2. 7 plugins/facetapi/adapter.inc \FacetapiAdapter::getMappedValue()

Returns the human readable value associated with a facet's raw value.

Parameters

string $facet_name: The machine readable name of the facet.

string $value: The raw value passed through the query string.

Return value

string The mapped value.

File

plugins/facetapi/adapter.inc, line 722
Adapter plugin and adapter related calsses.

Class

FacetapiAdapter
Abstract class extended by search backends that retrieves facet information from the database.

Code

public function getMappedValue($facet_name, $value) {
  if (isset($this->processors[$facet_name])) {
    return $this->processors[$facet_name]
      ->getMappedValue($value);
  }
  else {
    return array(
      '#value' => $value,
    );
  }
}