function onExecute(ActionEvent $event) { //Do something cool like dancing $event->getAction()->setState(Action::STATE_COMPLETED); }
function onExecute(ActionEvent $event) { if (true == $this->evil) { $this->evil = false; $event->getAction()->setState(Action::STATE_FAILURE); } else { $event->getAction()->setState(Action::STATE_COMPLETED); } }