You are here

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

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_help/src/Form/LdapDebugSettings.php, line 30

Class

LdapDebugSettings
Configuration form for LDAP debug settings.

Namespace

Drupal\ldap_help\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $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_help.settings')
      ->get('watchdog_detail'),
  ];
  $form = parent::buildForm($form, $form_state);
  return $form;
}