You are here

function SarniaSolrService::_getFilteredFields in Sarnia 7

1 call to SarniaSolrService::_getFilteredFields()
SarniaSolrService::getFilteredFields in ./service.inc

File

./service.inc, line 262

Class

SarniaSolrService
Search service class using Solr server.

Code

function _getFilteredFields($filter, $reset = FALSE) {
  $fields = array();

  // Use methods on the SolrField class for basic filtering.
  $filter_method = $this
    ->getFieldFilterMethod($filter);
  if ($filter_method) {
    foreach ($this
      ->getRemoteFields($reset) as $name => $field) {
      if ($field
        ->{$filter_method}()) {
        $fields[$name] = $field;
      }
    }
  }
  return $fields;
}