Projet

Général

Profil

Paste
Télécharger (515 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / views / modules / comment / views_handler_field_node_comment.inc @ 7547bb19

1
<?php
2

    
3
/**
4
 * @file
5
 * Definition of views_handler_field_node_comment.
6
 */
7

    
8
/**
9
 * Display node comment status.
10
 *
11
 * @ingroup views_field_handlers
12
 */
13
class views_handler_field_node_comment extends views_handler_field {
14
  function render($values) {
15
    $value = $this->get_value($values);
16
    switch ($value) {
17
      case COMMENT_NODE_HIDDEN:
18
      default:
19
        return t('Hidden');
20
      case COMMENT_NODE_CLOSED:
21
        return t('Closed');
22
      case COMMENT_NODE_OPEN:
23
        return t('Open');
24
    }
25
  }
26
}