You are here

public function StateMachine_Event::execute in State Machine 7

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

Execute the event.

File

inc/base.inc, line 274
base.inc

Class

StateMachine_Event

Code

public function execute() {
  if (!$this
    ->validate()) {
    return FALSE;
  }
  if (!empty($this->options['before_transition'])) {
    call_user_func($this->options['before_transition']);
  }
  return $this->options['target'];
}