views_handler_field_node_comment.inc

Same filename in other branches
  1. 6.x-3.x modules/comment/views_handler_field_node_comment.inc

Definition of views_handler_field_node_comment.

File

modules/comment/views_handler_field_node_comment.inc

View source
<?php


/**
 * @file
 * Definition of views_handler_field_node_comment.
 */

/**
 * Display node comment status.
 *
 * @ingroup views_field_handlers
 */
class views_handler_field_node_comment extends views_handler_field {
    
    /**
     * {@inheritdoc}
     */
    public 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');
        }
    }

}

Classes

Title Deprecated Summary
views_handler_field_node_comment Display node comment status.