public function OpignoMessageThread::__construct in Opigno messaging 3.x
OpignoMessageThread constructor.
Parameters
\Drupal\Core\Session\AccountInterface $account: The current user account.
\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
\Drupal\Core\Mail\MailManagerInterface $mail_manager: The mail service.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.
\Drupal\user\UserDataInterface $user_data: The user data service.
\Drupal\Core\Database\Connection $database: The DB connection service.
File
- src/
Services/ OpignoMessageThread.php, line 103
Class
- OpignoMessageThread
- The private messages manager service.
Namespace
Drupal\opigno_messaging\ServicesCode
public function __construct(AccountInterface $account, DateFormatterInterface $date_formatter, EntityTypeManagerInterface $entity_type_manager, MailManagerInterface $mail_manager, ConfigFactoryInterface $config_factory, UserDataInterface $user_data, Connection $database) {
$this->account = $account;
$this->dateFormatter = $date_formatter;
$this->mailService = $mail_manager;
$this->config = $config_factory;
$this->userData = $user_data;
$this->database = $database;
try {
$this->threadStorage = $entity_type_manager
->getStorage('private_message_thread');
} catch (PluginNotFoundException|InvalidPluginDefinitionException $e) {
watchdog_exception('opigno_messaging_exception', $e);
}
}