You are here

public function FormsStepsStepDeleteForm::buildForm in Forms Steps 8

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

\Drupal\forms_steps\FormsStepsInterface $forms_steps: The forms_steps entity being edited.

string|null $forms_steps_step: The forms_steps step being deleted.

Return value

array The form structure.

Overrides ConfirmFormBase::buildForm

File

src/Form/FormsStepsStepDeleteForm.php, line 76

Class

FormsStepsStepDeleteForm
Builds the form to delete steps from FormsSteps entities.

Namespace

Drupal\forms_steps\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, FormsStepsInterface $forms_steps = NULL, $forms_steps_step = NULL) {
  if (!$forms_steps
    ->hasStep($forms_steps_step)) {
    throw new NotFoundHttpException();
  }
  $this->formsSteps = $forms_steps;
  $this->stepId = $forms_steps_step;
  return parent::buildForm($form, $form_state);
}