You are here

function state_flow_node_revision_operations in State Machine 7.3

Same name and namespace in other branches
  1. 7.2 modules/state_flow/state_flow.module \state_flow_node_revision_operations()
  2. 7.2 modules/state_flow/state_flow.node.inc \state_flow_node_revision_operations()

Implements hook_node_revision_operations().

File

modules/state_flow/state_flow.module, line 527
An implementation of node revision workflow for Drupal based on the State Machine system.

Code

function state_flow_node_revision_operations() {
  $operations = array();
  $events = state_flow_get_all_events();
  foreach ($events as $event) {
    $operations["change_state_{$event}"] = array(
      'label' => t('Transition Action: @event', array(
        '@event' => $event,
      )),
      'callback' => 'state_flow_node_revision_operation_change_state',
      'callback arguments' => array(
        'args' => array(
          'event' => $event,
        ),
      ),
    );
  }
  return $operations;
}