public function FormsSteps::setStepSubmitLabel in Forms Steps 8
Sets a step's submit label.
Parameters
string $step_id: The step ID to set the submit label for.
string $label: The step's submit label.
Return value
\Drupal\forms_steps\StepInterface The forms_steps entity.
Overrides FormsStepsInterface::setStepSubmitLabel
File
- src/
Entity/ FormsSteps.php, line 613
Class
- FormsSteps
- FormsSteps configuration entity to persistently store configuration.
Namespace
Drupal\forms_steps\EntityCode
public function setStepSubmitLabel($step_id, $label) {
if (!isset($this->steps[$step_id])) {
throw new \InvalidArgumentException("The Step '{$step_id}' does not exist in forms steps '{$this->id()}'");
}
$this->steps[$step_id]['submitLabel'] = $label;
return $this;
}