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