You are here

function state_flow_node_revision_operations in State Machine 7.2

Same name in this branch
  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()
Same name and namespace in other branches
  1. 7.3 modules/state_flow/state_flow.module \state_flow_node_revision_operations()

Implements hook_node_revision_operations().

File

modules/state_flow/state_flow.module, line 640
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;
}