You are here

public function PrivateMessageService::updateLastCheckTime in Private Message 8.2

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

Marks a timestamp at which all threads are considered read.

Overrides PrivateMessageServiceInterface::updateLastCheckTime

File

src/Service/PrivateMessageService.php, line 305

Class

PrivateMessageService
The Private Message service for the private message module.

Namespace

Drupal\private_message\Service

Code

public function updateLastCheckTime() {
  $uid = $this->currentUser
    ->id();
  $this->userData
    ->set(self::MODULE_KEY, $uid, self::LAST_CHECK_KEY, $this->time
    ->getRequestTime());
  $tags[] = 'private_message_notification_block:uid:' . $this->currentUser
    ->id();
  $this->cacheTagsInvalidator
    ->invalidateTags($tags);
}