You are here

function workflow_transition_wrapper_form in Workflow 7.2

Form builder. Allow workflow comment change from menu item/Views link.

@todo D8: This is used, because the D7 form workflow_transition_form has the wrong parameters for the EntityUIController. But changing it breaks backwards compatibility.

2 string references to 'workflow_transition_wrapper_form'
WorkflowTransitionForm::buildForm in includes/Form/WorkflowTransitionForm.php
_state
workflow_forms in ./workflow.module
Implements hook_forms().

File

./workflow.form.inc, line 182
Contains helper functions for WorkflowTransitionForm.

Code

function workflow_transition_wrapper_form(array $form, array &$form_state, $transition, $op, $form_id) {

  // Override the default function 'entity_ui_controller_form_<op>'; we're not ready for that yet.
  $form['#validate'] = array(
    'workflow_transition_form_validate',
  );
  $form['#submit'] = array(
    'workflow_transition_form_submit',
  );

  // The Workflow transition is provided as such:
  // $form_state['entity_type'] = 'WorkflowTransition';
  // $form_state['WorkflowTransition'] = (Object) WorkflowTransition;
  return workflow_transition_form($form, $form_state, array(), array(), '', NULL);
}