You are here

public function WebformSubmissionDeleteForm::buildForm in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformSubmissionDeleteForm.php \Drupal\webform\Form\WebformSubmissionDeleteForm::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 ContentEntityDeleteForm::buildForm

File

src/Form/WebformSubmissionDeleteForm.php, line 57

Class

WebformSubmissionDeleteForm
Provides a confirmation webform for deleting a webform submission.

Namespace

Drupal\webform\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  list($this->webformSubmission, $this->sourceEntity) = $this->requestHandler
    ->getWebformSubmissionEntities();
  $this->webform = $this->webformSubmission
    ->getWebform();
  $form['warning'] = $this
    ->getWarning();
  $form = parent::buildForm($form, $form_state);
  $form['description'] = $this
    ->getDescription();
  return $this
    ->buildDialogConfirmForm($form, $form_state);
}