protected function StateMachine::set_current_state in State Machine 7
Same name and namespace in other branches
- 6 inc/base.inc \StateMachine::set_current_state()
- 7.3 inc/base.inc \StateMachine::set_current_state()
- 7.2 inc/base.inc \StateMachine::set_current_state()
Set the current state to the state identified by the specified key.
3 calls to StateMachine::set_current_state()
- 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.
- StateMachine::fire_event in inc/
base.inc - Trigger an event to process a transition. Callbacks and guard conditions will be processed in the following order:
- StateMachine::__construct in inc/
base.inc
File
Class
- StateMachine
- @file base.inc
Code
protected function set_current_state($key) {
if (array_key_exists($key, $this->states)) {
$this->current = $key;
return TRUE;
}
return FALSE;
}