You are here

public function FormsSteps::setProgressStepWeight in Forms Steps 8

File

src/Entity/FormsSteps.php, line 537

Class

FormsSteps
FormsSteps configuration entity to persistently store configuration.

Namespace

Drupal\forms_steps\Entity

Code

public function setProgressStepWeight($progress_step_id, $weight) {
  if (!isset($this->progress_steps[$progress_step_id])) {
    throw new \InvalidArgumentException("The progress step '{$progress_step_id}' does not exist in forms steps '{$this->id()}'");
  }
  $this->progress_steps[$progress_step_id]['weight'] = $weight;
  return $this;
}