function theme_ds_buildmodes_matrix_form in Display Suite 6.3
Same name and namespace in other branches
- 6 theme/theme_ui.inc \theme_ds_buildmodes_matrix_form()
- 6.2 theme/theme_ui.inc \theme_ds_buildmodes_matrix_form()
Theme build modes matrix form.
File
- theme/
theme_ui.inc, line 306 - Theming functions for ds ui.
Code
function theme_ds_buildmodes_matrix_form($form) {
$output = '';
// Header.
$header = array(
0 => '',
);
foreach ($form['#build_modes'] as $key => $mode) {
$header[] = $mode['title'];
}
// Checkboxes.
$rows = array();
foreach ($form['#types'] as $key => $type) {
$row = array();
$row[] = array(
'data' => check_plain(drupal_ucfirst($type->name)),
);
foreach ($form['#build_modes'] as $bkey => $mode) {
$row[] = array(
'data' => drupal_render($form['exclude'][$key][$key . '-' . $bkey]),
);
}
$rows[] = $row;
}
// Theme as table.
$table = theme('table', $header, $rows);
$table .= drupal_render($form['exclude']['submit']);
$fieldset = array(
'#title' => t('Exclude matrix'),
'#description' => t('Toggle per type which build modes you want to exclude from rendering. The "Toggle" checkbox will exclude/include all build modes at once.'),
'#children' => $table,
'#attributes' => array(),
);
$output = theme('fieldset', $fieldset);
$output .= drupal_render($form);
return $output;
}