You are here

public function LdapDebugSettings::buildForm in Lightweight Directory Access Protocol (LDAP) 8.4

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

ldap_servers/src/Form/LdapDebugSettings.php, line 32

Class

LdapDebugSettings
Configuration form for LDAP debug settings.

Namespace

Drupal\ldap_servers\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) : array {
  $form['#title'] = 'Configure LDAP Preferences';
  $form['watchdog_detail'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Enabled Detailed LDAP Watchdog logging.'),
    '#description' => $this
      ->t('This is generally useful for debugging and reporting issues with the LDAP modules and should not be left enabled in a production environment.'),
    '#default_value' => $this
      ->config('ldap_servers.settings')
      ->get('watchdog_detail'),
  ];
  return parent::buildForm($form, $form_state);
}