void transitionTo(
State
$nextState, [object data
$data = null])
|
|
Transitions to the given state from the current state.
Sends the exiting notification for the current state followed by the entering notification for the new state. Once finally transitioned to the new state, the changed notification for the new state is sent.
If a data parameter is provided, it is included as the body of all three state-specific transition notes.
Finally, when all the state-specific transition notes have been sent, a StateMachine.CHANGED note is sent, with the new State object as the body and the name of the new state in the type.
Tags:
Parameters: