You are here

public function SMTPConfigForm::__construct in SMTP Authentication Support 8

Constructs $messenger and $config_factory objects.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.

\Drupal\Core\Messenger\Messenger $messenger: The D8 messenger object.

\Drupal\Component\Utility\EmailValidatorInterface $email_validator: The Email Validator Service.

\Drupal\Core\Session\AccountProxyInterface $current_user: The current active user.

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

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.

Overrides ConfigFormBase::__construct

File

src/Form/SMTPConfigForm.php, line 73

Class

SMTPConfigForm
Implements the SMTP admin settings form.

Namespace

Drupal\smtp\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, Messenger $messenger, EmailValidatorInterface $email_validator, AccountProxyInterface $current_user, MailManagerInterface $mail_manager, ModuleHandlerInterface $module_handler) {
  $this->messenger = $messenger;
  $this->emailValidator = $email_validator;
  $this->currentUser = $current_user;
  $this->mailManager = $mail_manager;
  $this->moduleHandler = $module_handler;
  parent::__construct($config_factory);
}