You are here

public function SocialAuthUserManager::__construct in Social Auth 8

Constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Used for accessing Drupal configuration.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: Used for logging errors.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: Used for dispatching social auth events.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Used for loading and creating Drupal user objects.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: Used for access Drupal user field definitions.

\Drupal\Core\Utility\Token $token: Used for token support in Drupal user picture directory.

\Drupal\Core\Transliteration\PhpTransliteration $transliteration: Used for user picture directory and file transliteration.

\Drupal\Core\Routing\RouteProviderInterface $route_provider: Used to check if route path exists.

SessionInterface $session: Used for reading data from and writing data to session.

File

src/SocialAuthUserManager.php, line 87

Class

SocialAuthUserManager
Contains all logic that is related to Drupal user management.

Namespace

Drupal\social_auth

Code

public function __construct(ConfigFactoryInterface $config_factory, LoggerChannelFactoryInterface $logger_factory, EventDispatcherInterface $event_dispatcher, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, Token $token, PhpTransliteration $transliteration, LanguageManagerInterface $language_manager, RouteProviderInterface $route_provider, SessionInterface $session) {
  $this->configFactory = $config_factory;
  $this->loggerFactory = $logger_factory;
  $this->eventDispatcher = $event_dispatcher;
  $this->entityTypeManager = $entity_type_manager;
  $this->entityFieldManager = $entity_field_manager;
  $this->token = $token;
  $this->transliteration = $transliteration;
  $this->languageManager = $language_manager;
  $this->routeProvider = $route_provider;
  $this->session = $session;

  // Sets default plugin id.
  $this
    ->setPluginId('social_auth');
}