You are here

public function FacetapiQueryTypeRange::extract in Facet API 7

Same name and namespace in other branches
  1. 6.3 plugins/facetapi/query_type.inc \FacetapiQueryTypeRange::extract()
  2. 7.2 plugins/facetapi/query_type.inc \FacetapiQueryTypeRange::extract()

Overrides FacetapiQueryType::extract().

Adds the "start" and "end" values for the range.

Overrides FacetapiQueryType::extract

File

plugins/facetapi/query_type.inc, line 221
Interfaces and base classes for query type plugins.

Class

FacetapiQueryTypeRange
Base class for range query type plugins.

Code

public function extract(array $item) {
  $return = array();
  if (preg_match(FACETAPI_REGEX_RANGE, $item['value'], $matches)) {
    $return['start'] = $matches[1];
    $return['end'] = $matches[2];
  }
  return $return;
}