You are here

public function PrivateMessageForm::__construct in Private Message 8.2

Same name and namespace in other branches
  1. 8 src/Form/PrivateMessageForm.php \Drupal\private_message\Form\PrivateMessageForm::__construct()

Constructs a PrivateMessageForm object.

Parameters

\Drupal\Core\Entity\EntityRepositoryInterface $entityRepository: The entity repository service.

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager service.

\Drupal\Core\Session\AccountProxyInterface $currentUser: The current user.

\Drupal\Core\TypedData\TypedDataManagerInterface $typedDataManager: The typed data manager service.

\Drupal\user\UserDataInterface $userData: The user data service.

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The configuration factory service.

\Drupal\private_message\Service\PrivateMessageServiceInterface $privateMessageService: The private message service.

\Drupal\private_message\Service\PrivateMessageThreadManagerInterface $privateMessageThreadManager: The private message thread manager service.

Overrides ContentEntityForm::__construct

File

src/Form/PrivateMessageForm.php, line 120

Class

PrivateMessageForm
Defines the private message form.

Namespace

Drupal\private_message\Form

Code

public function __construct(EntityRepositoryInterface $entityRepository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, EntityTypeManagerInterface $entityTypeManager, AccountProxyInterface $currentUser, TypedDataManagerInterface $typedDataManager, UserDataInterface $userData, ConfigFactoryInterface $configFactory, PrivateMessageServiceInterface $privateMessageService, PrivateMessageThreadManagerInterface $privateMessageThreadManager) {
  parent::__construct($entityRepository, $entity_type_bundle_info, $time);
  $this->entityTypeManager = $entityTypeManager;
  $this->currentUser = $currentUser;
  $this->typedDataManager = $typedDataManager;
  $this->userData = $userData;
  $this->configFactory = $configFactory;
  $this->privateMessageService = $privateMessageService;
  $this->privateMessageThreadManager = $privateMessageThreadManager;
  $this->userManager = $entityTypeManager
    ->getStorage('user');
}