You are here

public function WebformUiElementDeleteForm::buildForm in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_ui/src/Form/WebformUiElementDeleteForm.php \Drupal\webform_ui\Form\WebformUiElementDeleteForm::buildForm()

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.

Return value

array The form structure.

Overrides WebformDeleteFormBase::buildForm

File

modules/webform_ui/src/Form/WebformUiElementDeleteForm.php, line 198

Class

WebformUiElementDeleteForm
Webform for deleting a webform element.

Namespace

Drupal\webform_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, WebformInterface $webform = NULL, $key = NULL) {
  $this->webform = $webform;
  $this->key = $key;
  $this->element = $webform
    ->getElement($key);
  if ($this->element === NULL) {
    throw new NotFoundHttpException();
  }
  $form = parent::buildForm($form, $form_state);
  $form = $this
    ->buildDialogConfirmForm($form, $form_state);
  return $form;
}