48 $currentStepId = $this->form->getCurrentStepId();
49 $firstInvalidStep = $this->form->getFirstInvalidStep();
51 $htmlString =
"<ol class=\"stepnav\">";
52 foreach ($this->form->getSteps() as $stepNum => $step) {
54 $class =
"step-$stepNum";
55 $label = $step->htmlLabel();
58 if ($stepNum <= $firstInvalidStep && $stepNum != $currentStepId) {
59 $link =
"href=\"" . htmlspecialchars($this->form->buildUrl([
'step' => $stepNum])) .
"\"";
63 if ($stepNum < $currentStepId) {
64 $class .= $step->validate() ?
" valid" :
" invalid";
67 if ($stepNum == $currentStepId) {
68 $htmlString .=
"<li class=\"current-step $class\"><a $link><strong>$label</strong></a></li>";
70 $htmlString .=
"<li class=\"$class\"><a $link>$label</a></li>";
73 $htmlString .=
"</ol>";