You are here

function theme_uc_payment_method_table in Ubercart 5

Same name and namespace in other branches
  1. 6.2 payment/uc_payment/uc_payment.admin.inc \theme_uc_payment_method_table()
  2. 7.3 payment/uc_payment/uc_payment.admin.inc \theme_uc_payment_method_table()
1 theme call to theme_uc_payment_method_table()
uc_payment_methods_form in payment/uc_payment/uc_payment.module

File

payment/uc_payment/uc_payment.module, line 453

Code

function theme_uc_payment_method_table($form) {
  $header = array(
    t('Enabled'),
    t('Payment method'),
    t('Weight'),
    t('Default gateway'),
  );
  foreach (element_children($form) as $method) {
    $rows[] = array(
      array(
        'data' => drupal_render($form[$method]['uc_payment_method_' . $method . '_checkout']),
        'align' => 'center',
      ),
      drupal_render($form[$method]['name']),
      drupal_render($form[$method]['uc_payment_method_' . $method . '_weight']),
      drupal_render($form[$method]['uc_payment_' . $method . '_gateway']),
    );
  }
  if (empty($rows)) {
    $rows[] = array(
      array(
        'data' => t('No payment methods founds.'),
        'colspan' => 5,
      ),
    );
  }
  return theme('table', $header, $rows);
}