You are here

public function RemovalSettingsForm::buildForm in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 modules/gdpr_tasks/src/Form/RemovalSettingsForm.php \Drupal\gdpr_tasks\Form\RemovalSettingsForm::buildForm()
  2. 3.0.x modules/gdpr_tasks/src/Form/RemovalSettingsForm.php \Drupal\gdpr_tasks\Form\RemovalSettingsForm::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 ConfigFormBase::buildForm

File

modules/gdpr_tasks/src/Form/RemovalSettingsForm.php, line 35

Class

RemovalSettingsForm
Settings form for GDPR Removal task.

Namespace

Drupal\gdpr_tasks\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['directory'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Export Directory'),
    '#description' => $this
      ->t('Specifies the path to the directory where Right to be Forgotten tasks are exported after being processed'),
    '#required' => TRUE,
    '#default_value' => $this
      ->config(self::CONFIG_KEY)
      ->get(self::EXPORT_DIRECTORY),
  ];
  return parent::buildForm($form, $form_state);
}