function views_handler_field::element_type
Return an HTML element based upon the field's element type.
2 methods override views_handler_field::element_type()
- views_handler_field_markup::element_type in handlers/
views_handler_field_markup.inc - Return an HTML element based upon the field's element type.
- views_handler_field_user_picture::element_type in modules/
user/ views_handler_field_user_picture.inc - Return an HTML element based upon the field's element type.
File
-
handlers/
views_handler_field.inc, line 223
Class
- views_handler_field
- Base field handler that has no options and renders an unformatted field.
Code
public 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';
}