public function FormsSteps::setStepFormMode in Forms Steps 8
Sets a step's form mode value.
Parameters
string $step_id: The step ID to set the form mode for.
int $formMode: The step's form mode.
Return value
\Drupal\forms_steps\StepInterface The forms_steps entity.
Overrides FormsStepsInterface::setStepFormMode
File
- src/
Entity/ FormsSteps.php, line 587
Class
- FormsSteps
- FormsSteps configuration entity to persistently store configuration.
Namespace
Drupal\forms_steps\EntityCode
public function setStepFormMode($step_id, $formMode) {
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]['form_mode'] = $formMode;
return $this;
}