You are here

public function LdapUserTestForm::__construct in Lightweight Directory Access Protocol (LDAP) 8.3

Same name and namespace in other branches
  1. 8.4 ldap_user/src/Form/LdapUserTestForm.php \Drupal\ldap_user\Form\LdapUserTestForm::__construct()

File

ldap_user/src/Form/LdapUserTestForm.php, line 39

Class

LdapUserTestForm
A form to allow the administrator to query LDAP.

Namespace

Drupal\ldap_user\Form

Code

public function __construct(RequestStack $request_stack, ServerFactory $server_factory, EntityTypeManagerInterface $entity_type_manager) {
  $this->request = $request_stack
    ->getCurrentRequest();
  $this->serverFactory = $server_factory;
  $this->entityTypeManager = $entity_type_manager;
  self::$syncTriggerOptions = [
    self::PROVISION_DRUPAL_USER_ON_USER_UPDATE_CREATE => $this
      ->t('On sync to Drupal user create or update. Requires a server with binding method of "Service Account Bind" or "Anonymous Bind".'),
    self::PROVISION_DRUPAL_USER_ON_USER_AUTHENTICATION => $this
      ->t('On create or sync to Drupal user when successfully authenticated with LDAP credentials. (Requires LDAP Authentication module).'),
    self::PROVISION_DRUPAL_USER_ON_USER_ON_MANUAL_CREATION => $this
      ->t('On manual creation of Drupal user from admin/people/create and "Create corresponding LDAP entry" is checked'),
    self::PROVISION_LDAP_ENTRY_ON_USER_ON_USER_UPDATE_CREATE => $this
      ->t('On creation or sync of an LDAP entry when a Drupal account is created or updated. Only applied to accounts with a status of approved.'),
    self::PROVISION_LDAP_ENTRY_ON_USER_ON_USER_AUTHENTICATION => $this
      ->t('On creation or sync of an LDAP entry when a user authenticates.'),
    self::PROVISION_LDAP_ENTRY_ON_USER_ON_USER_DELETE => $this
      ->t('On deletion of an LDAP entry when the corresponding Drupal Account is deleted.  This only applies when the LDAP entry was provisioned by Drupal by the LDAP User module.'),
  ];
}