You are here

function theme_workflow_admin_ui_edit_form in Workflow 7

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

Theme the workflow editing form.

See also

workflow_edit_form()

File

workflow_admin_ui/workflow_admin_ui.pages.inc, line 355
Provides administrative UI for workflow. Why it's own module? Lower code footprint and better performance. Additional credit 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_edit_form($variables) {
  $output = '';
  $form = $variables['form'];
  $workflow = $variables['form']['workflow']['#value'];

  // If we don't have a workflow here, we need to go back to admin.
  if ($workflow) {
    drupal_set_title(t('Edit workflow %name', array(
      '%name' => $workflow
        ->getName(),
    )), PASS_THROUGH);
    $output .= drupal_render_children($form);
    return $output;
  }
  else {
    drupal_goto('admin/config/workflow/workflow');
  }
}