public function StateMachine::get_current_state in State Machine 6
Same name and namespace in other branches
- 7.3 inc/base.inc \StateMachine::get_current_state()
- 7 inc/base.inc \StateMachine::get_current_state()
- 7.2 inc/base.inc \StateMachine::get_current_state()
Returns the current state.
2 calls to StateMachine::get_current_state()
- StateFlow::persist in modules/
state_flow/ plugins/ state_flow.inc - Persist the current state to the object storage.
- StateMachine::get_available_events in inc/
base.inc - Returns an array of events that are valid for the current state.
File
- inc/
base.inc, line 87
Class
Code
public function get_current_state() {
if (!$this->current) {
$this->current = key($this->states);
}
return $this->current;
}