You are here

protected function Authorize::buildFormToken in DRD Agent 8.3

Same name and namespace in other branches
  1. 4.0.x src/Form/Authorize.php \Drupal\drd_agent\Form\Authorize::buildFormToken()

Build the authorization form to paste the token from DRD.

Parameters

array $form: The form array.

Return value

array The form.

1 call to Authorize::buildFormToken()
Authorize::buildForm in src/Form/Authorize.php
Form constructor.

File

src/Form/Authorize.php, line 55

Class

Authorize
Authorize a new dashboard for this drd-agent.

Namespace

Drupal\drd_agent\Form

Code

protected function buildFormToken(array $form) : array {
  $form['token'] = [
    '#type' => 'textarea',
    '#title' => t('Authentication token'),
    '#description' => t('Paste the token for this domain from the DRD dashboard, which you want to authorize.'),
    '#default_value' => '',
    '#required' => TRUE,
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => t('Validate'),
  ];
  return $form;
}