Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MailHandler.php

function MailHandler::__construct

Constructs a new \Drupal\contact\MailHandler object.

Parameters

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

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

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: String translation service.

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

File

core/modules/contact/src/MailHandler.php, line 62

Class

MailHandler
Provides a class for handling assembly and dispatch of contact mail messages.

Namespace

Drupal\contact

Code

public function __construct(MailManagerInterface $mail_manager, LanguageManagerInterface $language_manager, LoggerInterface $logger, TranslationInterface $string_translation, EntityTypeManagerInterface $entity_type_manager) {
    $this->languageManager = $language_manager;
    $this->mailManager = $mail_manager;
    $this->logger = $logger;
    $this->stringTranslation = $string_translation;
    $this->userStorage = $entity_type_manager->getStorage('user');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal