You are here

public function RemoveGatherContentLocalData::buildForm in GatherContent 8.4

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

gathercontent_ui/src/Form/RemoveGatherContentLocalData.php, line 25

Class

RemoveGatherContentLocalData
Class RemoveGatherContentLocalData.

Namespace

Drupal\gathercontent_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  drupal_set_message($this
    ->t('This operation is irreversible and should be done before module uninstall!'), 'warning');
  $form['remove_message'] = [
    '#type' => 'markup',
    '#markup' => $this
      ->t('This form removes the reference Gather Content IDs from your local Drupal site. The nodes keeps on your site.'),
  ];
  $form['actions']['#type'] = 'actions';
  $form['actions']['delete'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Delete data'),
    '#button_type' => 'primary',
    '#return_value' => 'submit',
  ];
  return $form;
}