protected function apachesolr_views_query::argument_part in Apache Solr Views 6
return the facet argument suitable for Views
Parameters
string $field: name of the facet
Return value
string the part of the url for Views that matches this facet value
1 call to apachesolr_views_query::argument_part()
- apachesolr_views_query::get_path in ./
apachesolr_views_query.inc - return the search path
File
- ./
apachesolr_views_query.inc, line 663
Class
- apachesolr_views_query
- Class for handling a view that gets its data not from the database, but from a Solr server.
Code
protected function argument_part($field) {
$argument_path = '';
if (empty($this->_facets[$field])) {
if ($field == 'text' && !empty($this->_query)) {
//the search argument is special
return $this->_query;
}
else {
return '';
}
}
foreach ($this->_facets[$field] as $defintion) {
if (!$defintion['exclude']) {
$argument_path .= ',' . $defintion['value'];
}
}
return drupal_substr($argument_path, 1);
}