5 * Definition of views_handler_field_filter_format_name.
9 * Field handler to output the name of an input format.
11 * @ingroup views_field_handlers
13 class views_handler_field_filter_format_name extends views_handler_field {
14 function construct() {
16 // Be explicit about the table we are using.
17 $this->additional_fields['name'] = array('table' => 'filter_formats', 'field' => 'name');
21 $this->ensure_my_table();
22 $this->add_additional_fields();
25 function render($values) {
26 $format_name = $this->get_value($values, 'name');
28 // Default or invalid input format.
29 // filter_formats() will reliably return the default format even if the
30 // current user is unprivileged.
31 $format = filter_formats(filter_default_format());
32 return $this->sanitize_value($format->name);
34 return $this->sanitize_value($format_name);