1 views_handler_field.inc views_handler_field::element_label_type($none_supported = FALSE, $default_empty = FALSE)

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

File

core/modules/views/handlers/views_handler_field.inc, line 221
@todo.

Class

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

Code

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

  if ($default_empty) {
    return '';
  }

  return 'span';
}