function ds_group_fieldset in Display Suite 6
Theme a group (fieldset).
Parameters
string $content The content to render.:
string $field The field to theme.:
5 string references to 'ds_group_fieldset'
- ds_build_fields_and_regions in ./
ds.module - Get fields and regions for an object.
- template_preprocess_ds_display_overview_form in theme/
theme_ui.inc - Theme preprocess function for ds-display-overview-form.tpl.php.
- template_preprocess_ds_display_overview_views_form in theme/
theme_ui.inc - Theme preprocess function for ds-display-overview-views-form.tpl.php.
- views_plugin_ds_fields_view::ds_fields_render in views/
views_plugin_ds_fields_view.inc - Render the fields.
- _ds_theme in includes/
ds.registry.inc - Return theme functions.
File
- theme/
theme.inc, line 158 - Theming functions for ds.
Code
function ds_group_fieldset($content, $field) {
$add_js = FALSE;
$class = $field['class'];
$variation = array_pop(explode('_', $field['theme']));
switch ($variation) {
case 'collapsible':
$add_js = TRUE;
$class .= ' collapsible';
break;
case 'collapsed':
$add_js = TRUE;
$class .= ' collapsible collapsed';
break;
default:
break;
}
// Add js.
if ($add_js == TRUE) {
drupal_add_js('misc/collapse.js');
}
return '<fieldset class="group ' . $class . '"><legend>' . $field['title'] . '</legend>' . $content . '</fieldset>';
}