You are here

function views_handler_field_node_type::render_name in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 modules/node/views_handler_field_node_type.inc \views_handler_field_node_type::render_name()
  2. 7.3 modules/node/views_handler_field_node_type.inc \views_handler_field_node_type::render_name()

Render node type as human readable name, unless using machine_name option.

1 call to views_handler_field_node_type::render_name()
views_handler_field_node_type::render in modules/node/views_handler_field_node_type.inc
Render the field.

File

modules/node/views_handler_field_node_type.inc, line 31

Class

views_handler_field_node_type
Field handler to translate a node type into its readable form.

Code

function render_name($data, $values) {
  if ($this->options['machine_name'] != 1 && $data !== NULL && $data !== '') {
    return t(check_plain(node_get_types('name', $data)));
  }
  return check_plain($data);
}