You are here

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

Work out the depth of this comment

Overrides FieldPluginBase::render

File

lib/Views/comment/Plugin/views/field/Depth.php, line 28
Definition of Views\comment\Plugin\views\field\Depth.

Class

Depth
Field handler to display the depth of a comment.

Namespace

Views\comment\Plugin\views\field

Code

function render($values) {
  $comment_thread = $this
    ->get_value($values);
  return count(explode('.', $comment_thread)) - 1;
}