You are here

public function FacetapiAdapter::getMappedValue in Facet API 7.2

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

Maps a facet's index value to a human readable value displayed to the user.

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 945
Adapter plugin and adapter related classes.

Class

FacetapiAdapter
Abstract class extended by Facet API adapters.

Code

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