You are here

function state_flow_events_form_submit in State Machine 6

Implementation of hook_form_submit

_state

Parameters

array $form:

File

modules/state_flow/state_flow.module, line 145
A base implementation of the state machine class and its relationship to revisions

Code

function state_flow_events_form_submit($form, &$form_state) {
  $event = $form_state['values']['events'];
  $state_flow = $form_state['values']['state_flow'];
  $state_flow
    ->fire_event($event);
  $state = $state_flow
    ->get_current_state();
  drupal_set_message(t('Node transitioned to @state state.', array(
    '@state' => $state,
  )));
}