You are here

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

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

LdapUserTestForm constructor.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $request_stack: Request stack.

\Drupal\ldap_servers\LdapUserManager $ldap_user_manager: LDAP user manager.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager.

\Drupal\externalauth\Authmap $external_auth: External auth.

\Drupal\ldap_user\Processor\DrupalUserProcessor $drupal_user_processor: Drupal user processor.

File

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

Class

LdapUserTestForm
A form to allow the administrator to query LDAP.

Namespace

Drupal\ldap_user\Form

Code

public function __construct(RequestStack $request_stack, LdapUserManager $ldap_user_manager, EntityTypeManagerInterface $entity_type_manager, Authmap $external_auth, DrupalUserProcessor $drupal_user_processor) {
  $this->request = $request_stack
    ->getCurrentRequest();
  $this->ldapUserManager = $ldap_user_manager;
  $this->entityTypeManager = $entity_type_manager;
  $this->externalAuth = $external_auth;
  $this->drupalUserProcessor = $drupal_user_processor;
  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.'),
  ];
}