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