You are here

public function MessageForm::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/contact/src/MessageForm.php \Drupal\contact\MessageForm::__construct()

Constructs a MessageForm object.

Parameters

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.

\Drupal\Core\Flood\FloodInterface $flood: The flood control mechanism.

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

\Drupal\contact\MailHandlerInterface $mail_handler: The contact mail handler service.

\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date service.

Overrides ContentEntityForm::__construct

File

core/modules/contact/src/MessageForm.php, line 72
Contains \Drupal\contact\MessageForm.

Class

MessageForm
Form controller for contact message forms.

Namespace

Drupal\contact

Code

public function __construct(EntityManagerInterface $entity_manager, FloodInterface $flood, LanguageManagerInterface $language_manager, MailHandlerInterface $mail_handler, DateFormatterInterface $date_formatter) {
  parent::__construct($entity_manager);
  $this->flood = $flood;
  $this->languageManager = $language_manager;
  $this->mailHandler = $mail_handler;
  $this->dateFormatter = $date_formatter;
}