function theme_panelizer_settings_page_table in Panelizer 7.3
Same name and namespace in other branches
- 7.2 includes/admin.inc \theme_panelizer_settings_page_table()
Format the output of the main settings form.
We want our checkboxes to show up in a table.
1 theme call to theme_panelizer_settings_page_table()
- PanelizerEntityDefault::settings_form in plugins/
entity/ PanelizerEntityDefault.class.php - Add entity specific form to the Panelizer settings form.
File
- includes/
admin.inc, line 142 - Contains administrative forms and settings.
Code
function theme_panelizer_settings_page_table($variables) {
$element = $variables['element'];
// Render the table
$header = $element['#header'];
$columns = $element['#columns'];
$rows = array();
foreach (element_children($element) as $bundle) {
foreach (element_children($element[$bundle]) as $view_mode) {
$row = array();
foreach ($columns as $column) {
$row[] = drupal_render($element[$bundle][$view_mode][$column]);
}
$rows[] = $row;
}
}
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
));
// Render everything else
$output .= drupal_render_children($element);
return $output;
}