You are here

public function PrivateMessageService::__construct in Private Message 8.2

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

Constructs a PrivateMessageService object.

Parameters

Drupal\private_message\Mapper\PrivateMessageMapperInterface $mapper: The private message mapper service.

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

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

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

\Drupal\Core\Cache\CacheTagsInvalidatorInterface $cacheTagsInvalidator: The cache tags invalidator interface.

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

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

File

src/Service/PrivateMessageService.php, line 98

Class

PrivateMessageService
The Private Message service for the private message module.

Namespace

Drupal\private_message\Service

Code

public function __construct(PrivateMessageMapperInterface $mapper, AccountProxyInterface $currentUser, ConfigFactoryInterface $configFactory, UserDataInterface $userData, CacheTagsInvalidatorInterface $cacheTagsInvalidator, EntityTypeManagerInterface $entityTypeManager, TimeInterface $time) {
  $this->mapper = $mapper;
  $this->currentUser = $currentUser;
  $this->configFactory = $configFactory;
  $this->userData = $userData;
  $this->cacheTagsInvalidator = $cacheTagsInvalidator;
  $this->pmThreadManager = $entityTypeManager
    ->getStorage('private_message_thread');
  $this->userManager = $entityTypeManager
    ->getStorage('user');
  $this->time = $time;
}