1 views_handler_field_machine_name.inc views_handler_field_machine_name::render($values)

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides views_handler_field::render

File

core/modules/views/handlers/views_handler_field_machine_name.inc, line 61
Definition of views_handler_field_machine_name.

Class

views_handler_field_machine_name
Field handler whichs allows to show machine name content as human name.

Code

function render($values) {
  $value = $values->{$this->field_alias};
  if (!empty($this->options['machine_name']) || !isset($this->value_options[$value])) {
    $result = check_plain($value);
  }
  else {
    $result = $this->value_options[$value];
  }

  return $result;
}