You are here

function workbench_workflows_revision_operation_process in Workbench Moderation 7.2

Revision operation process callback for scheduled moderation state changes.

1 string reference to 'workbench_workflows_revision_operation_process'
workbench_workflows_entity_revision_operation_info in modules/workbench_workflows/workbench_workflows.module
Implements hook_entity_revision_operation_info().

File

modules/workbench_workflows/workbench_workflows.module, line 390
workbench_workflows.module

Code

function workbench_workflows_revision_operation_process($entity, $operation) {

  // Extract the transition to state from the operation key: 'workbench_moderation_state'.
  $event = substr($operation->operation, 21);
  $machine = state_flow_entity_load_state_machine($entity, $operation->entity_type);
  if (!empty($machine) && !$machine
    ->ignore()) {
    $machine
      ->fire_event($event);
  }
}