function theme_themekey_ui_table in ThemeKey 6
Same name and namespace in other branches
- 6.4 themekey_ui_admin.inc \theme_themekey_ui_table()
- 6.2 themekey_ui_admin.inc \theme_themekey_ui_table()
- 6.3 themekey_ui_admin.inc \theme_themekey_ui_table()
- 7.3 themekey_ui_admin.inc \theme_themekey_ui_table()
- 7 themekey_ui_admin.inc \theme_themekey_ui_table()
- 7.2 themekey_ui_admin.inc \theme_themekey_ui_table()
Function theme_themekey_ui_table().
1 theme call to theme_themekey_ui_table()
- _themekey_ui_settings_form in ./
themekey_ui_admin.inc - Function _themekey_ui_settings_form().
File
- ./
themekey_ui_admin.inc, line 176
Code
function theme_themekey_ui_table($form) {
$header = isset($form['#header']) ? $form['#header'] : array();
$attributes = isset($form['#attributes']) ? $form['#attributes'] : array();
$rows = array();
foreach (element_children($form) as $key) {
$row = array();
foreach (element_children($form[$key]) as $item) {
$row[] = drupal_render($form[$key][$item]);
}
$rows[] = $row;
}
if (empty($rows)) {
$message = check_plain(isset($form['#empty']) ? $form['#empty'] : t('There are no items in the table.'));
$rows[] = array(
array(
'data' => $message,
'colspan' => count($header),
'align' => 'center',
'class' => 'message',
),
);
}
return count($rows) ? theme('table', $header, $rows, $attributes) : '';
}