You are here

function state_flow_nodeapi in State Machine 6

Implementation of hook_nodeapi().

File

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

Code

function state_flow_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {

  // Use Drupal 7 style node hooks.
  switch ($op) {
    case 'delete revision':
      $node_hook = 'state_flow_node_revision_delete';
      break;
    default:
      $node_hook = 'state_flow_node_' . $op;
      break;
  }
  if (function_exists($node_hook)) {
    return $node_hook($node, $a3, $a4);
  }
}