You are here

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

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

Constructor.

Parameters

\Psr\Log\LoggerInterface $logger: Logger.

\Drupal\Core\Config\ConfigFactory $config: Config.

\Drupal\Core\Mail\MailManagerInterface $mail_manager: Mail manager.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: Language manager.

\Drupal\Core\State\StateInterface $state: State.

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

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

File

ldap_user/src/Processor/OrphanProcessor.php, line 124

Class

OrphanProcessor
Locates potential orphan user accounts.

Namespace

Drupal\ldap_user\Processor

Code

public function __construct(LoggerInterface $logger, ConfigFactory $config, MailManagerInterface $mail_manager, LanguageManagerInterface $language_manager, StateInterface $state, EntityTypeManagerInterface $entity_type_manager, LdapUserManager $ldap_user_manager) {
  $this->logger = $logger;
  $this->configFactory = $config;
  $this->configLdapUser = $config
    ->get('ldap_user.settings');
  $this->mailManager = $mail_manager;
  $this->languageManager = $language_manager;
  $this->state = $state;
  $this->entityTypeManager = $entity_type_manager;
  $this->ldapUserManager = $ldap_user_manager;
  $storage = $this->entityTypeManager
    ->getStorage('ldap_server');
  $data = $storage
    ->getQuery()
    ->condition('status', 1)
    ->execute();
  $this->enabledServers = $storage
    ->loadMultiple($data);
}