You are here

public function StateFlowEntity::write_active in State Machine 7.3

Update the current status record for the revision.

Only one revision may be active at a time. If additional revisions need to be active, please use fields for now.

Using $this->history_entity assumes that write_history() has already been called.

called from fire_event() and update_entity_state() when the user is submitting the entity's edit form (like node edit for example). When called twice we must match the hid but if it's straight from the state_flow_entity transition form state_flow_entity_events_revision() we know that the revision exists and is not new

See also

state_flow_entity_events_revision()

1 call to StateFlowEntity::write_active()
StateFlowEntity::entity_saved in modules/state_flow_entity/plugins/state_flow_entity.inc
Called by hook_entity_insert() / hook_entity_update().

File

modules/state_flow_entity/plugins/state_flow_entity.inc, line 816
State Flow implementation of the State Machine class.

Class

StateFlowEntity
@file State Flow implementation of the State Machine class.

Code

public function write_active() {
  $this
    ->write_state($this->history_entity, TRUE);
}