views_handler_field_comment_depth.inc in Views (for Drupal 7) 7.3
Same filename and directory in other branches
Definition of views_handler_field_comment_depth.
File
modules/comment/views_handler_field_comment_depth.incView source
<?php
/**
* @file
* Definition of views_handler_field_comment_depth.
*/
/**
* Field handler to display the depth of a comment.
*
* @ingroup views_field_handlers
*/
class views_handler_field_comment_depth extends views_handler_field {
/**
* Work out the depth of this comment.
*/
public function render($values) {
$comment_thread = $this
->get_value($values);
return count(explode('.', $comment_thread)) - 1;
}
}
Classes
Name![]() |
Description |
---|---|
views_handler_field_comment_depth | Field handler to display the depth of a comment. |