public function PrivateMessageNotifier::__construct in Private Message 8.2
Constructs a new PrivateMessageNotifier object.
Parameters
\Drupal\private_message\Service\PrivateMessageServiceInterface $privateMessageService: The private message service.
\Drupal\Core\Session\AccountProxyInterface $currentUser: The current user.
\Drupal\user\UserDataInterface $userData: The user data service.
\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The configuration factory service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager service.
\Drupal\message_notify\MessageNotifier $messageNotifier: The message notification service.
File
- src/
Service/ PrivateMessageNotifier.php, line 77
Class
- PrivateMessageNotifier
- A service class for sending notifications of private messages.
Namespace
Drupal\private_message\ServiceCode
public function __construct(PrivateMessageServiceInterface $privateMessageService, AccountProxyInterface $currentUser, UserDataInterface $userData, ConfigFactoryInterface $configFactory, EntityTypeManagerInterface $entityTypeManager, MessageNotifier $messageNotifier) {
$this->privateMessageService = $privateMessageService;
$this->currentUser = $currentUser;
$this->userData = $userData;
$this->config = $configFactory
->get('private_message.settings');
$this->messageManager = $entityTypeManager
->getStorage('message');
$this->messageNotifier = $messageNotifier;
}