function NodeNewComments::render

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides Numeric::render

File

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

Class

NodeNewComments
Field handler to display the number of new comments.

Namespace

Drupal\comment\Plugin\views\field

Code

function render($values) {
  $value = $this
    ->get_value($values);
  if (!empty($value)) {
    return $this
      ->render_link(parent::render($values), $values);
  }
  else {
    $this->options['alter']['make_link'] = FALSE;
  }
}