public function FormsSteps::setStepDeleteState in Forms Steps 8
Set the delete state (hidden or shown) of the step.
Parameters
int $step_id: Step id.
bool $state: State to set.
Return value
\Drupal\forms_steps\Entity\FormsSteps The forms steps.
Overrides FormsStepsInterface::setStepDeleteState
File
- src/
Entity/ FormsSteps.php, line 694
Class
- FormsSteps
- FormsSteps configuration entity to persistently store configuration.
Namespace
Drupal\forms_steps\EntityCode
public function setStepDeleteState($step_id, $state) {
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]['hideDelete'] = $state;
return $this;
}