theme_uc_pane_sort_table

Versions
5 – 6
theme_uc_pane_sort_table($form)

Theme a pane sorting form into a table!

Code

contributions/ubercart/uc_store/uc_store.module, line 2534

<?php
function theme_uc_pane_sort_table($form) {
  $prefix = $form['#pane_prefix'];
  if (isset($form['#table_attributes']) && is_array($form['#table_attributes'])) {
    $attributes = $form['#table_attributes'];
  }
  else {
    $attributes = array();
  }

  $header = array(t('Enabled'), t('Title'), t('Weight'));

  foreach (element_children($form) as $pane_id) {
    $rows[] = array(
      array(
        'data' => drupal_render($form[$pane_id][$prefix .'_'. $pane_id .'_enabled']),
        'align' => 'center'
      ),
      drupal_render($form[$pane_id]['title']),
      drupal_render($form[$pane_id][$prefix .'_'. $pane_id .'_weight']),
    );
  }

  return theme('table', $header, $rows, $attributes) .'<br />';
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.