You are here

function drupagram_views_handler_field_location::render in Drupagram 7

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

./drupagram_views_field_handlers.inc, line 362
Drupagram views field handlers.

Class

drupagram_views_handler_field_location
Field handler to render the location.

Code

function render($values) {
  $value = $values->{$this->field_alias};
  if ($this->options['format'] == 'location') {
    $value = $value ? unserialize($value) : array();
    return check_plain(isset($value['name']) ? $value['name'] : '');
  }
  return $value;
}