function views_handler_field_serialized::render
Overrides views_handler_field::render
File
-
handlers/
views_handler_field_serialized.inc, line 63
Class
- views_handler_field_serialized
- Field handler to show data of serialized fields.
Code
public function render($values) {
$value = $values->{$this->field_alias};
if ($this->options['format'] == 'unserialized') {
return check_plain(print_r(unserialize($value), TRUE));
}
elseif ($this->options['format'] == 'key' && !empty($this->options['key'])) {
$value = (array) unserialize($value);
return check_plain($value[$this->options['key']]);
}
return check_plain($value);
}