You are here

public function SarniaViewsHandlerField::get_value in Sarnia 7

Extract the value of this field from the solr properties.

Parameters

$values: An object containing all retrieved values.

$field: Optional name of the field where the value is stored. Not used by this handler.

Return value

An array of scalars, or a scalar.

Overrides views_handler_field::get_value

2 calls to SarniaViewsHandlerField::get_value()
SarniaViewsHandlerField::render in handlers/handler_field.inc
Fallback method to render the field.
SarniaViewsHandlerField::set_items in handlers/handler_field.inc
Extract the field values as an array of items.

File

handlers/handler_field.inc, line 282

Class

SarniaViewsHandlerField
Field handler for displaying Solr fields in Views.

Code

public function get_value($values, $field = NULL) {
  if (!empty($values->_entity_properties[$this->options['solr_property']])) {
    return $values->_entity_properties[$this->options['solr_property']];
  }
  return NULL;
}