function theme_ds_multigroup_table_simple in Display Suite 6.2
Same name and namespace in other branches
- 6.3 theme/theme.inc \theme_ds_multigroup_table_simple()
Theme a multigroup (fieldset).
Parameters
string $group: The multigroup to theme.
Return value
bool | string A string representing the rendered fieldset, or FALSE if not content is rendered.
1 string reference to 'theme_ds_multigroup_table_simple'
- _ds_theme in includes/
ds.registry.inc - Return theme functions.
File
- theme/
theme.inc, line 307 - Theming functions for ds.
Code
function theme_ds_multigroup_table_simple($group) {
$headers = array();
$rows = array();
foreach ($group['rows'] as $row) {
$items = array();
foreach ($row['fields'] as $field) {
$item = $field['view'];
if (!empty($item)) {
$items[] = $item;
}
}
if (!empty($items)) {
if (!empty($row['title'])) {
array_unshift($items, '<label class="content-multigroup">' . $row['title'] . ':</label>');
}
$rows[] = array(
'data' => array(
implode("\n", $items),
),
'class' => $field['class'],
);
}
}
return count($rows) ? theme('table', $headers, $rows) : '';
}