You are here

public function FormsSteps::setProgressStepActiveRoutes in Forms Steps 8

Sets the progress step's active routes.

Parameters

string $progress_step_id: The progress step ID to set the active routes for.

array $routes: The progress step's active routes.

Return value

\Drupal\forms_steps\ProgressStepInterface The forms_steps entity.

Overrides FormsStepsInterface::setProgressStepActiveRoutes

File

src/Entity/FormsSteps.php, line 707

Class

FormsSteps
FormsSteps configuration entity to persistently store configuration.

Namespace

Drupal\forms_steps\Entity

Code

public function setProgressStepActiveRoutes($progress_step_id, array $routes) {
  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]['routes'] = $routes;
  return $this;
}