function views_handler_field_boolean::render
Same name in other branches
- 7.x-3.x handlers/views_handler_field_boolean.inc \views_handler_field_boolean::render()
Overrides views_handler_field::render
File
-
handlers/
views_handler_field_boolean.inc, line 62
Class
- views_handler_field_boolean
- A handler to provide proper displays for booleans.
Code
function render($values) {
$value = $this->get_value($values);
if (!empty($this->options['not'])) {
$value = !$value;
}
if (isset($this->formats[$this->options['type']])) {
return $value ? $this->formats[$this->options['type']][0] : $this->formats[$this->options['type']][1];
}
else {
return $value ? $this->formats['yes-no'][0] : $this->formats['yes-no'][1];
}
}