public function FacetapiQueryTypeRange::extract in Facet API 7.2
Same name and namespace in other branches
- 6.3 plugins/facetapi/query_type.inc \FacetapiQueryTypeRange::extract()
- 7 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 216 - 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;
}