public function FacetapiQueryTypeDate::extract in Facet API 7
Same name and namespace in other branches
- 6.3 plugins/facetapi/query_type.inc \FacetapiQueryTypeDate::extract()
- 7.2 plugins/facetapi/query_type.inc \FacetapiQueryTypeDate::extract()
Overrides FacetapiQueryType::extract().
Adds the "start" and "end" values for the date range.
Overrides FacetapiQueryType::extract
File
- plugins/
facetapi/ query_type.inc, line 201 - Interfaces and base classes for query type plugins.
Class
- FacetapiQueryTypeDate
- Base class for date query type plugins.
Code
public function extract(array $item) {
$return = array();
if (preg_match(FACETAPI_REGEX_DATE_RANGE, $item['value'], $matches)) {
$return['start'] = $matches[1];
$return['end'] = $matches[8];
}
return $return;
}