function NodeComment::render

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides FieldPluginBase::render

File

drupal/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeComment.php, line 25
Definition of Drupal\comment\Plugin\views\field\NodeComment.

Class

NodeComment
Display node comment status.

Namespace

Drupal\comment\Plugin\views\field

Code

function render($values) {
  $value = $this
    ->get_value($values);
  switch ($value) {
    case COMMENT_NODE_HIDDEN:
    default:
      return t('Hidden');
    case COMMENT_NODE_CLOSED:
      return t('Closed');
    case COMMENT_NODE_OPEN:
      return t('Open');
  }
}