You are here

function theme_workflow_admin_ui_types_form in Workflow 6

Same name and namespace in other branches
  1. 6.2 workflow_admin_ui/workflow_admin_ui.module \theme_workflow_admin_ui_types_form()

Theme the workflow type mapping form.

File

workflow_admin_ui/workflow_admin_ui.module, line 800
Provides administrative UI for workflow. Why it's own module? Lower code footprint and better performance. Additional creadit to gcassie ( http://drupal.org/user/80260 ) for the initial push to split UI out of core workflow. We're moving…

Code

function theme_workflow_admin_ui_types_form($form) {
  $header = array(
    t('Content Type'),
    t('Workflow'),
    t('Display Workflow Form for:'),
  );
  $rows = array();
  foreach (node_get_types('names') as $type => $name) {
    $name = $form[$type]['workflow']['#title'];
    unset($form[$type]['workflow']['#title']);
    $rows[] = array(
      $name,
      drupal_render($form[$type]['workflow']),
      drupal_render($form[$type]['placement']),
    );
  }
  $output = drupal_render($form['help']);
  $output .= theme('table', $header, $rows);
  return $output . drupal_render($form);
}