public function onReject(TransitionEvent $e)
 {
     // If we transitioned from Submitted state, then send an rejected email.
     if ($e->getInitialState()->getName() === DNDeployment::STATE_SUBMITTED) {
         $this->sendRejectedEmail($e->getStateMachine()->getObject());
     }
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function isSatisfiedBy(TransitionEvent $event)
 {
     return $event->getStateMachine() === $this->stateMachine && $this->supportsClause('from', $event->getInitialState()->getName()) && $this->supportsClause('to', $event->getTransition()->getState()) && $this->supportsClause('on', $event->getTransition()->getName());
 }