You are here

public function EmailExampleGetFormPage::__construct in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/email_example/src/Form/EmailExampleGetFormPage.php \Drupal\email_example\Form\EmailExampleGetFormPage::__construct()

Constructs a new EmailExampleGetFormPage.

Parameters

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

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

\Drupal\Component\Utility\EmailValidator $email_validator: The email validator.

File

email_example/src/Form/EmailExampleGetFormPage.php, line 50

Class

EmailExampleGetFormPage
File test form class.

Namespace

Drupal\email_example\Form

Code

public function __construct(MailManagerInterface $mail_manager, LanguageManagerInterface $language_manager, EmailValidator $email_validator) {
  $this->mailManager = $mail_manager;
  $this->languageManager = $language_manager;
  $this->emailValidator = $email_validator;
}