예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function forward($scenarioAlias, $stepName)
 {
     $process = $this->buildProcess($scenarioAlias);
     $step = $process->getStepByName($stepName);
     $this->context->initialize($process, $step);
     $this->context->rewindHistory();
     return $this->processStepResult($process, $this->context->isValid() ? $step->forwardAction($this->context) : $this->context->getProcess()->getValidator()->getResponse($step));
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function forward($scenarioAlias, $stepName)
 {
     $process = $this->buildProcess($scenarioAlias);
     $step = $process->getStepByName($stepName);
     $this->context->initialize($process, $step);
     try {
         $this->context->rewindHistory();
     } catch (NotFoundHttpException $e) {
         return $this->goToLastValidStep($process, $scenarioAlias);
     }
     return $this->processStepResult($process, $this->context->isValid() ? $step->forwardAction($this->context) : $this->context->getProcess()->getValidator()->getResponse($step));
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function forward($scenarioAlias, $stepName)
 {
     $process = $this->buildProcess($scenarioAlias);
     $step = $process->getStepByName($stepName);
     $this->context->initialize($process, $step);
     $this->context->rewindHistory();
     if (($validator = $this->context->isValid()) !== true) {
         return $validator->getResponse($step);
     }
     $result = $step->forwardAction($this->context);
     return $this->processStepResult($process, $result);
 }