protected function StateMachine::set_initial_state in State Machine 7
Same name and namespace in other branches
- 6 inc/base.inc \StateMachine::set_initial_state()
- 7.3 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
Class
- StateMachine
- @file base.inc
Code
protected function set_initial_state($key) {
if (array_key_exists($key, $this->states)) {
$this->initial_state = $key;
return TRUE;
}
return FALSE;
}