function FieldPluginBase::element_type in Views (for Drupal 7) 8.3
Return an HTML element based upon the field's element type.
2 methods override FieldPluginBase::element_type()
- Markup::element_type in lib/
Drupal/ views/ Plugin/ views/ field/ Markup.php - Return an HTML element based upon the field's element type.
- Picture::element_type in lib/
Views/ user/ Plugin/ views/ field/ Picture.php - Return an HTML element based upon the field's element type.
File
- lib/
Drupal/ views/ Plugin/ views/ field/ FieldPluginBase.php, line 197 - 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_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {
if ($none_supported) {
if ($this->options['element_type'] === '0') {
return '';
}
}
if ($this->options['element_type']) {
return check_plain($this->options['element_type']);
}
if ($default_empty) {
return '';
}
if ($inline) {
return 'span';
}
if (isset($this->definition['element type'])) {
return $this->definition['element type'];
}
return 'span';
}