protected function StateMachine::set_initial_state in State Machine 6
Same name and namespace in other branches
- 7.3 inc/base.inc \StateMachine::set_initial_state()
- 7 inc/base.inc \StateMachine::set_initial_state()
- 7.2 inc/base.inc \StateMachine::set_initial_state()
Set the initial state for this machine. By default, the initial state is set the the first created state.
File
- inc/
base.inc, line 98
Class
Code
protected function set_initial_state($key) {
if (array_key_exists($key, $this->states)) {
$this->initial_state = $key;
return TRUE;
}
return FALSE;
}