Project

General

Profile

Paste
Download (469 Bytes) Statistics
| Branch: | Revision:

root / drupal7 / sites / all / modules / webform / views / webform_handler_field_is_draft.inc @ 01f36513

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
}