You are here

function facetapi_facetapi_value_range_alter in Facet API 6

Implementation of hook_facetapi_value_QUERY_TYPE_alter().

Processes range queries.

File

./facetapi.module, line 825
An abstracted facet API that can be used by various search backens.

Code

function facetapi_facetapi_value_range_alter(array &$value, FacetapiAdapter $adapter) {
  if (preg_match(FACETAPI_REGEX_RANGE, $value['value'], $matches)) {
    $value['range'] = TRUE;
    $value['start'] = $matches[1];
    $value['end'] = $matches[2];
  }
}