function FieldPluginBase::element_label_type in Views (for Drupal 7) 8.3
Return an HTML element for the label based upon the field's element type.
File
- lib/
Drupal/ views/ Plugin/ views/ field/ FieldPluginBase.php, line 225 - Definition of Drupal\views\Plugin\views\field\FieldPluginBase.
Class
- FieldPluginBase
- Base field handler that has no options and renders an unformatted field.
Namespace
Drupal\views\Plugin\views\fieldCode
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';
}