You are here

function state_flow_node_insert in State Machine 7

Same name and namespace in other branches
  1. 6 modules/state_flow/state_flow.module \state_flow_node_insert()
  2. 7.2 modules/state_flow/state_flow.module \state_flow_node_insert()

Implements hook_node_insert().

File

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

Code

function state_flow_node_insert($node) {
  global $user;
  $state_flow = state_flow_load_state_machine($node);
  $state_flow
    ->persist();
  $state_flow
    ->write_history($user->uid);
}