You are here

function theme_messaging_admin_methods_table in Messaging 7

Same name and namespace in other branches
  1. 6.4 messaging.admin.inc \theme_messaging_admin_methods_table()

Format main methods settings form

1 theme call to theme_messaging_admin_methods_table()
messaging_admin_settings in ./messaging.admin.inc
Admin settings form

File

./messaging.admin.inc, line 281
Messaging Framework - Admin UI

Code

function theme_messaging_admin_methods_table($variables) {
  $elements = $variables['elements'];
  $output = '';
  $header = array(
    t('Enabled'),
    t('Default'),
    t('Method'),
    t('Description'),
  );
  $rows = array();
  foreach (element_children($elements['name']) as $key) {
    $rows[] = array(
      drupal_render($elements['messaging_method_enabled'][$key]),
      drupal_render($elements['messaging_default_method'][$key]),
      '<strong>' . drupal_render($elements['name'][$key]) . '</strong>',
      drupal_render($elements['description'][$key]),
    );
  }
  $output .= theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render_children($elements);
  return $output;
}