You are here

function NodeComment::render in Views (for Drupal 7) 8.3

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides FieldPluginBase::render

File

lib/Views/comment/Plugin/views/field/NodeComment.php, line 25
Definition of Views\comment\Plugin\views\field\NodeComment.

Class

NodeComment
Display node comment status.

Namespace

Views\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');
  }
}