MailHandler::__construct

public MailHandler::__construct(MailManagerInterface $mail_manager, LanguageManagerInterface $language_manager, LoggerInterface $logger, TranslationInterface $string_translation, EntityManagerInterface $entity_manager)

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\EntityManagerInterface $entity_manager: Entity manager service.

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, EntityManagerInterface $entity_manager) {
  $this->languageManager = $language_manager;
  $this->mailManager = $mail_manager;
  $this->logger = $logger;
  $this->stringTranslation = $string_translation;
  $this->userStorage = $entity_manager->getStorage('user');
}
doc_Drupal
2016-10-29 09:25:13
Comments
Leave a Comment

Please login to continue.