You are here

public function FormsSteps::getPreviousStepRoute in Forms Steps 8

Returns the previous step route.

Parameters

\Drupal\forms_steps\Step $step: Current Step.

Return value

null|string Returns the previous route.

File

src/Entity/FormsSteps.php, line 335

Class

FormsSteps
FormsSteps configuration entity to persistently store configuration.

Namespace

Drupal\forms_steps\Entity

Code

public function getPreviousStepRoute(Step $step) {
  $previousRoute = NULL;
  $previousStep = $this
    ->getPreviousStep($step);
  if ($previousStep) {
    $previousRoute = 'forms_steps.' . $this->id . '.' . $previousStep
      ->id();
  }
  return $previousRoute;
}