public function Authorize::buildForm in DRD Agent 4.0.x
Same name and namespace in other branches
- 8.3 src/Form/Authorize.php \Drupal\drd_agent\Form\Authorize::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/ Authorize.php, line 112
Class
- Authorize
- Authorize a new dashboard for this drd-agent.
Namespace
Drupal\drd_agent\FormCode
public function buildForm(array $form, FormStateInterface $form_state) : array {
$form = empty($_SESSION['drd_agent_authorization_values']) ? $this
->buildFormToken($form) : $this
->buildFormConfirmation($form);
$form['#attributes'] = [
'class' => [
'drd-agent-auth',
],
];
$form['#attached']['library'][] = 'drd_agent/general';
return $form;
}