You are here

public function CreateGdprRequestOnBehalfOfUserForm::buildForm in General Data Protection Regulation 8.2

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

modules/gdpr_tasks/src/Form/CreateGdprRequestOnBehalfOfUserForm.php, line 51

Class

CreateGdprRequestOnBehalfOfUserForm
Form for user task requests.

Namespace

Drupal\gdpr_tasks\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  return [
    '#title' => $this
      ->t('Create request on behalf of user'),
    'notes' => [
      '#type' => 'textarea',
      '#title' => $this
        ->t('Notes'),
      '#description' => $this
        ->t('Enter the reason for creating this request.'),
    ],
    'actions' => [
      '#type' => 'actions',
      'submit' => [
        '#type' => 'submit',
        '#value' => $this
          ->t('Create Request'),
      ],
    ],
  ];
}