You are here

public function PrepareUninstallForm::buildForm in Simplenews 8.2

Same name and namespace in other branches
  1. 8 src/Form/PrepareUninstallForm.php \Drupal\simplenews\Form\PrepareUninstallForm::buildForm()
  2. 3.x src/Form/PrepareUninstallForm.php \Drupal\simplenews\Form\PrepareUninstallForm::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 FormInterface::buildForm

File

src/Form/PrepareUninstallForm.php, line 23

Class

PrepareUninstallForm
Removes fields and data used by Simplenews.

Namespace

Drupal\simplenews\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['simplenews'] = [
    '#type' => 'fieldset',
    '#title' => $this
      ->t('Prepare uninstall'),
    '#description' => $this
      ->t('When clicked all Simplenews data (content, fields) will be removed.'),
  ];
  $form['simplenews']['prepare_uninstall'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Delete Simplenews data'),
  ];
  return $form;
}