You are here

function Type::render_name in Views (for Drupal 7) 8.3

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

1 call to Type::render_name()
Type::render in lib/Views/node/Plugin/views/field/Type.php
Render the field.

File

lib/Views/node/Plugin/views/field/Type.php, line 49
Definition of Views\node\Plugin\views\field\Type.

Class

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

Namespace

Views\node\Plugin\views\field

Code

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