public function PrivateMessageMailer::__construct in Private Message 8
Constructs a new PrivateMessageMailer object.
Parameters
\Drupal\private_message\Service\PrivateMessageServiceInterface $privateMessageService: The private message service.
\Drupal\Core\Mail\MailManagerInterface $mailManager: The mail manager 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.
File
- src/
Service/ PrivateMessageMailer.php, line 67
Class
- PrivateMessageMailer
- A service class for sending notification emails for private messages.
Namespace
Drupal\private_message\ServiceCode
public function __construct(PrivateMessageServiceInterface $privateMessageService, MailManagerInterface $mailManager, AccountProxyInterface $currentUser, UserDataInterface $userData, ConfigFactoryInterface $configFactory) {
$this->privateMessageService = $privateMessageService;
$this->mailManager = $mailManager;
$this->currentUser = $currentUser;
$this->userData = $userData;
$this->config = $configFactory
->get('private_message.settings');
}