root / drupal7 / sites / all / modules / webform / views / webform_handler_field_is_draft.inc @ 7b2d1845
1 |
<?php |
---|---|
2 |
|
3 |
/** |
4 |
* Views handler to display the draft status of a submission. |
5 |
* |
6 |
* Field handler to show if submission is draft or not. |
7 |
* |
8 |
* @ingroup views_field_handlers |
9 |
*/ |
10 |
class webform_handler_field_is_draft extends views_handler_field { |
11 |
|
12 |
/** |
13 |
* |
14 |
*/ |
15 |
public function render($values) { |
16 |
$is_draft = $values->{$this->field_alias}; |
17 |
return isset($is_draft) |
18 |
? ($is_draft ? t('draft') : t('completed')) |
19 |
: t('no submission'); |
20 |
} |
21 |
|
22 |
} |