You are here

public function StepChangeEvent::__construct in Forms Steps 8

Constructs the object.

Parameters

\Drupal\forms_steps\Entity\FormsSteps $forms_steps: The FormsSteps object.

\Drupal\forms_steps\Step $from_step: The step the user is currently on.

\Drupal\forms_steps\Step $to_step: The next/previous step the user is going to be redirected.

FormState $form_state: The formState.

File

src/Event/StepChangeEvent.php, line 57

Class

StepChangeEvent
Event that is fired when before we switch from one step to another.

Namespace

Drupal\forms_steps\Event

Code

public function __construct(FormsSteps $forms_steps, Step $from_step, Step $to_step, FormState $form_state) {
  $this->formsSteps = $forms_steps;
  $this->fromStep = $from_step;
  $this->toStep = $to_step;
  $this->formState = $form_state;
}