Select Git revision
InstallerBrokenDatabaseCredentialsTest.php
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
MessageForm.php 7.66 KiB
<?php
namespace Drupal\contact;
use Drupal\Component\Datetime\TimeInterface;
use Drupal\Core\Datetime\DateFormatterInterface;
use Drupal\Core\Entity\ContentEntityForm;
use Drupal\Core\Entity\EntityRepositoryInterface;
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
use Drupal\Core\Flood\FloodInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Form controller for contact message forms.
*
* @internal
*/
class MessageForm extends ContentEntityForm {
/**
* The message being used by this form.
*
* @var \Drupal\contact\MessageInterface
*/
protected $entity;
/**
* The flood control mechanism.
*
* @var \Drupal\Core\Flood\FloodInterface
*/
protected $flood;
/**
* The language manager service.
*
* @var \Drupal\Core\Language\LanguageManagerInterface
*/
protected $languageManager;
/**
* The contact mail handler service.
*
* @var \Drupal\contact\MailHandlerInterface
*/
protected $mailHandler;
/**
* The date formatter service.
*
* @var \Drupal\Core\Datetime\DateFormatterInterface
*/
protected $dateFormatter;
/**
* Constructs a MessageForm object.
*
* @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository
* The entity repository.
* @param \Drupal\Core\Flood\FloodInterface $flood
* The flood control mechanism.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager service.
* @param \Drupal\contact\MailHandlerInterface $mail_handler
* The contact mail handler service.
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
* The date service.
* @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info