You are here

function theme_services_admin_browse_test in Services 6.2

Same name and namespace in other branches
  1. 5 services_admin_browse.inc \theme_services_admin_browse_test()
  2. 6 services_admin_browse.inc \theme_services_admin_browse_test()
  3. 7 services_admin_browse.inc \theme_services_admin_browse_test()

Implementation of hook_theme();

File

./services_admin_browse.inc, line 246
Browser thru all services and servers.

Code

function theme_services_admin_browse_test($form) {
  $output = '';
  $output .= drupal_render($form['test']);
  $header = array(
    t('Name'),
    t('Required'),
    t('Value'),
    t('Format'),
  );
  $rows = array();
  foreach (element_children($form['name']) as $key => $type) {
    $row = array();
    if (isset($form['arg'][$key]['#title'])) {
      $row[] = $form['arg'][$key]['#title'];
      unset($form['arg'][$key]['#title']);
      unset($form['name'][$key]);
    }
    else {
      $row[] = drupal_render($form['name'][$key]);
    }
    $row[] = drupal_render($form['optional'][$key]);
    $row[] = drupal_render($form['arg'][$key]);
    $row[] = drupal_render($form['format'][$key]);
    $rows[] = $row;
  }
  $output .= theme('table', $header, $rows);
  $output .= drupal_render($form['submit']);
  $output .= drupal_render($form);
  return $output;
}