public function FormsStepsManager::getNextStep in Forms Steps 8
Get the forms_steps next step.
Parameters
mixed $route_name: Current route.
Return value
null|\Drupal\forms_steps\Step Next Step.
File
- src/
Service/ FormsStepsManager.php, line 84
Class
- FormsStepsManager
- Class FormsStepsManager.
Namespace
Drupal\forms_steps\ServiceCode
public function getNextStep($route_name) {
$matches = self::getRouteParameters($route_name);
if ($matches) {
/** @var \Drupal\forms_steps\Entity\FormsSteps $formsSteps */
$formsSteps = FormsSteps::load($matches[1]);
if ($formsSteps) {
/** @var \Drupal\forms_steps\Step $nextStep */
return $formsSteps
->getNextStep($formsSteps
->getStep($matches[2]));
}
}
return NULL;
}