You are here

function state_flow_events_form in State Machine 6

Custom form to show the events that are available

Parameters

array $form_state:

object $node:

Return value

array

1 string reference to 'state_flow_events_form'
state_flow_events in modules/state_flow/state_flow.module
Show the states as a node tab

File

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

Code

function state_flow_events_form(&$form_state, $state_flow) {
  $form = array();
  $events = $state_flow
    ->get_available_events();
  $form['events'] = array(
    '#type' => 'radios',
    '#title' => t('Fire event'),
    '#options' => drupal_map_assoc($events),
  );
  $form['state_flow'] = array(
    '#type' => 'value',
    '#value' => $state_flow,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Update'),
  );
  return $form;
}