function content_handler_field_multiple::element_type in Content Construction Kit (CCK) 6.2
Same name and namespace in other branches
- 6.3 includes/views/handlers/content_handler_field_multiple.inc \content_handler_field_multiple::element_type()
Return DIV or SPAN based upon the field's element type.
Fields rendered with the 'group multiple' option use <div> markers, and thus shouldn't be wrapped in a <span>.
Overrides content_handler_field::element_type
File
- includes/
views/ handlers/ content_handler_field_multiple.inc, line 193 - An extended subclass for field handling that adds multiple field grouping.
Class
- content_handler_field_multiple
- @file An extended subclass for field handling that adds multiple field grouping.
Code
function element_type($none_supported = FALSE, $default_empty = FALSE) {
// If this is not a grouped field, use the parent method.
if (!$this->defer_query) {
return parent::element_type($none_supported, $default_empty);
}
// The 'element_type' property denotes Views 3.x ('semantic views'
// functionnality). If the property is set, and not set to '' ("default"),
// let the generic method handle the output.
if (isset($this->options['element_type']) && $this->options['element_type'] !== '') {
return parent::element_type($none_supported, $default_empty);
}
if ($default_empty) {
return '';
}
if (isset($this->definition['element type'])) {
return $this->definition['element type'];
}
return 'div';
}