public function PrivateMessageForm::__construct in Private Message 8
Same name and namespace in other branches
- 8.2 src/Form/PrivateMessageForm.php \Drupal\private_message\Form\PrivateMessageForm::__construct()
Constructs a PrivateMessageForm object.
Parameters
\Drupal\Core\Entity\EntityManagerInterface $entityManager: The entity manager service.
\Drupal\Core\Session\AccountProxyInterface $currentUser: The current user.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager service.
\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 113
Class
- PrivateMessageForm
- Defines the private message form.
Namespace
Drupal\private_message\FormCode
public function __construct(EntityManagerInterface $entityManager, AccountProxyInterface $currentUser, EntityTypeManagerInterface $entityTypeManager, TypedDataManagerInterface $typedDataManager, UserDataInterface $userData, ConfigFactoryInterface $configFactory, PrivateMessageServiceInterface $privateMessageService, PrivateMessageThreadManagerInterface $privateMessageThreadManager) {
parent::__construct($entityManager);
$this->currentUser = $currentUser;
$this->entityTypeManager = $entityTypeManager;
$this->typedDataManager = $typedDataManager;
$this->userData = $userData;
$this->config = $configFactory
->get('private_message.settings');
$this->privateMessageService = $privateMessageService;
$this->privateMessageThreadManager = $privateMessageThreadManager;
$this->userManager = $entityManager
->getStorage('user');
}