function views_handler_field_system_drupal_core::render in Views System 7.3
Same name and namespace in other branches
- 6.3 views/handlers/views_handler_field_system_drupal_core.inc \views_handler_field_system_drupal_core::render()
- 6.2 views/handlers/views_handler_field_system_drupal_core.inc \views_handler_field_system_drupal_core::render()
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field_boolean::render
File
- views/
handlers/ views_handler_field_system_drupal_core.inc, line 17 - Views field handler for the views_system module.
Class
- views_handler_field_system_drupal_core
- Renders the Drupal core field of the system item.
Code
function render($values) {
$value = _views_system_get_drupal_core($values->{$this->field_alias});
if (!empty($this->options['not'])) {
$value = !$value;
}
if (isset($this->formats[$this->options['type']])) {
$output = $value ? $this->formats[$this->options['type']][0] : $this->formats[$this->options['type']][1];
}
else {
$output = $value ? $this->formats['yes-no'][0] : $this->formats['yes-no'][1];
}
return $output;
}