function apachesolr_views_query::has_filter in Apache Solr Views 6
Checks to see if the facet has bene applied
Parameters
string $field: the facet field to check
string $value: The facet value to check against
File
- ./
apachesolr_views_query.inc, line 564
Class
- apachesolr_views_query
- Class for handling a view that gets its data not from the database, but from a Solr server.
Code
function has_filter($field, $value) {
if (isset($this->_facets[$field])) {
foreach ($this->_facets[$field] as $definition) {
if ($definition['value'] == $value && $definition['exclude'] == FALSE) {
return TRUE;
}
}
}
return FALSE;
}