You are here

function theme_ds_multigroup_list in Display Suite 6.2

Same name and namespace in other branches
  1. 6.3 theme/theme.inc \theme_ds_multigroup_list()

Theme a multigroup list.

Parameters

string $group: The group 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_list'
_ds_theme in includes/ds.registry.inc
Return theme functions.

File

theme/theme.inc, line 433
Theming functions for ds.

Code

function theme_ds_multigroup_list($group) {
  $attr = array();
  $variation = array_pop(explode('_', $group['theme']));
  switch ($variation) {
    case 'ol':
      $type = 'ol';
      break;
    case 'ul':
    default:
      $type = 'ul';
      break;
  }
  $items = array();
  foreach ($group['rows'] as $row) {
    if (!empty($row['rendered'])) {
      $items[] = $row['rendered'];
    }
  }
  $attr['class'] .= $row['class'];
  return count($items) ? theme('item_list', $items, NULL, $type, $attr) : '';
}