function Picture::element_type in Views (for Drupal 7) 8.3
Return an HTML element based upon the field's element type.
Overrides FieldPluginBase::element_type
File
- lib/
Views/ user/ Plugin/ views/ field/ Picture.php, line 37 - Definition of Views\user\Plugin\views\field\Picture.
Class
- Picture
- Field handler to provide simple renderer that allows using a themed user link.
Namespace
Views\user\Plugin\views\fieldCode
function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {
if ($inline) {
return 'span';
}
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 (isset($this->definition['element type'])) {
return $this->definition['element type'];
}
return 'div';
}