public function FacetapiQueryTypeRange::extract in Facet API 6.3
Same name and namespace in other branches
- 7.2 plugins/facetapi/query_type.inc \FacetapiQueryTypeRange::extract()
- 7 plugins/facetapi/query_type.inc \FacetapiQueryTypeRange::extract()
Parses the start and end values for the date.
Overrides FacetapiQueryType::extract
File
- plugins/
facetapi/ query_type.inc, line 141 - 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;
}