function views_handler_field::get_value

3.x views_handler_field.inc views_handler_field::get_value($values, $field = NULL)

Get the value that's supposed to be rendered.

This api exists so that other modules can easy set the values of the field without having the need to change the render method as well.

Parameters

$values: An object containing all retrieved values.

$field: Optional name of the field where the value is stored.

3 methods override views_handler_field::get_value()
views_handler_field_entity::get_value in handlers/views_handler_field_entity.inc
Overridden to return the entity object, or a certain property of the entity.
views_handler_field_field::get_value in modules/field/views_handler_field_field.inc
Get the value that's supposed to be rendered.
views_handler_field_prerender_list::get_value in handlers/views_handler_field_prerender_list.inc
Get the value that's supposed to be rendered.

File

handlers/views_handler_field.inc, line 374
@todo.

Class

views_handler_field
Base field handler that has no options and renders an unformatted field.

Code

function get_value($values, $field = NULL) {
  $alias = isset($field) ? $this->aliases[$field] : $this->field_alias;
  if (isset($values->{$alias})) {
    return $values->{$alias};
  }
}