You are here

public function StateFlow::write_history in State Machine 7

Same name and namespace in other branches
  1. 7.2 modules/state_flow/plugins/state_flow.inc \StateFlow::write_history()
1 call to StateFlow::write_history()
StateFlow::fire_event in modules/state_flow/plugins/state_flow.inc
Extending fire_event() from state_machine's base.inc to add uid and log arguments.

File

modules/state_flow/plugins/state_flow.inc, line 120

Class

StateFlow

Code

public function write_history($uid, $log = '') {
  $data = new stdClass();
  $data->vid = $this->object->vid;
  $data->nid = $this->object->nid;
  $data->state = $this
    ->get_current_state();
  $data->timestamp = REQUEST_TIME;
  $data->uid = $uid;
  $data->log = $log;
  return drupal_write_record('node_revision_states_history', $data);
}