You are here

public function StateMachine_Event::can_transition_from in State Machine 7.3

Same name and namespace in other branches
  1. 6 inc/base.inc \StateMachine_Event::can_transition_from()
  2. 7 inc/base.inc \StateMachine_Event::can_transition_from()
  3. 7.2 inc/base.inc \StateMachine_Event::can_transition_from()

Evaluates if this event can be used to transition from the specified state.

File

inc/base.inc, line 435
Defines the base classes of the state machine.

Class

StateMachine_Event
Base class for events.

Code

public function can_transition_from($state) {
  return in_array($state, $this->options['origin']);
}