You are here

private function AdminSettingsForm::buildIdentityForm in Acquia Lift Connector 8

Same name and namespace in other branches
  1. 8.4 src/Form/AdminSettingsForm.php \Drupal\acquia_lift\Form\AdminSettingsForm::buildIdentityForm()
  2. 8.3 src/Form/AdminSettingsForm.php \Drupal\acquia_lift\Form\AdminSettingsForm::buildIdentityForm()

Build identity form.

Return value

array Identity form.

1 call to AdminSettingsForm::buildIdentityForm()
AdminSettingsForm::buildForm in src/Form/AdminSettingsForm.php
Form constructor.

File

src/Form/AdminSettingsForm.php, line 150
Contains \Drupal\acquia_lift\Form\AdminSettingsForm.

Class

AdminSettingsForm
Defines a form that configures settings.

Namespace

Drupal\acquia_lift\Form

Code

private function buildIdentityForm() {
  $identity_settings = $this
    ->config('acquia_lift.settings')
    ->get('identity');
  $form = [
    '#title' => t('Identity'),
    '#type' => 'details',
    '#tree' => TRUE,
    '#group' => 'data_collection_settings',
  ];

  //    $form['capture_identity'] = [
  //      '#type' => 'checkbox',
  //      '#title' => t('Capture identity on login / register'),
  //      '#default_value' => $identity_settings['capture_identity'],
  //    ];
  $form['identity_parameter'] = [
    '#type' => 'textfield',
    '#title' => t('Identity Parameter'),
    '#default_value' => $identity_settings['identity_parameter'],
  ];
  $form['identity_type_parameter'] = [
    '#type' => 'textfield',
    '#title' => t('Identity Type Parameter'),
    '#default_value' => $identity_settings['identity_type_parameter'],
    '#states' => [
      'visible' => [
        ':input[name="identity[identity_parameter]"]' => [
          '!value' => '',
        ],
      ],
    ],
  ];
  $form['default_identity_type'] = [
    '#type' => 'textfield',
    '#title' => t('Default Identity Type'),
    '#default_value' => $identity_settings['default_identity_type'],
    '#placeholder' => SettingsHelper::DEFAULT_IDENTITY_TYPE_DEFAULT,
  ];
  return $form;
}