You are here

function workflow_vbo_given_state_action_submit in Workflow 7

Same name and namespace in other branches
  1. 7.2 workflow_vbo/actions/given.action.inc \workflow_vbo_given_state_action_submit()

Submit handler for "Change workflow state of post to new state" action configuration form.

See also

workflow_vbo_given_state_action_form()

File

workflow_vbo/workflow_vbo.module, line 146
Provide workflow actions for VBO. Split out from workflow_actions.

Code

function workflow_vbo_given_state_action_submit($form_id, $form_state) {
  $new_sid = $form_state['values']['workflow_options'];
  if ($state = WorkflowState::load($new_sid)) {
    return array(
      'target_sid' => $state->sid,
      'state_name' => check_plain($state
        ->getName()),
      'force' => $form_state['values']['workflow_force'],
      'workflow_comment' => $form_state['values']['workflow_comment'],
    );
  }
}