Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/comment/views_handler_field_last_comment_timestamp.inc | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* Field handler to display the timestamp of a comment with the count of comments.
|
|
9 |
* Field handler to display the timestamp of a comment with the comments count.
|
|
10 | 10 |
* |
11 | 11 |
* @ingroup views_field_handlers |
12 | 12 |
*/ |
13 | 13 |
class views_handler_field_last_comment_timestamp extends views_handler_field_date { |
14 |
function construct() { |
|
14 |
|
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function construct() { |
|
15 | 19 |
parent::construct(); |
16 | 20 |
$this->additional_fields['comment_count'] = 'comment_count'; |
17 | 21 |
} |
18 | 22 |
|
19 |
function render($values) { |
|
23 |
/** |
|
24 |
* {@inheritdoc} |
|
25 |
*/ |
|
26 |
public function render($values) { |
|
20 | 27 |
$comment_count = $this->get_value($values, 'comment_count'); |
21 | 28 |
if (empty($this->options['empty_zero']) || $comment_count) { |
22 | 29 |
return parent::render($values); |
... | ... | |
25 | 32 |
return NULL; |
26 | 33 |
} |
27 | 34 |
} |
35 |
|
|
28 | 36 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules