Same name and namespace in other branches
  1. 6.x-3.x handlers/views_handler_field.inc \views_handler_field::element_wrapper_type()

Return an HTML element for the wrapper based upon the field's element type.

File

handlers/views_handler_field.inc, line 271
Definition of views_handler_field.

Class

views_handler_field
Base field handler that has no options and renders an unformatted field.

Code

public function element_wrapper_type($none_supported = FALSE, $default_empty = FALSE) {
  if ($none_supported) {
    if ($this->options['element_wrapper_type'] === '0') {
      return 0;
    }
  }
  if ($this->options['element_wrapper_type']) {
    return check_plain($this->options['element_wrapper_type']);
  }
  if ($default_empty) {
    return '';
  }
  return 'div';
}