You are here

function theme_panelizer_settings_page_table in Panelizer 7.2

Same name and namespace in other branches
  1. 7.3 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 156
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) {
    $row = array();
    foreach ($columns as $column) {
      $row[] = drupal_render($element[$bundle][$column]);
    }
    $rows[] = $row;
  }
  $output = theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));

  // Render everything else
  $output .= drupal_render_children($element);
  return $output;
}