public function PrivateMessageThread::getLastAccessTimestamp in Private Message 8
Same name and namespace in other branches
- 8.2 src/Entity/PrivateMessageThread.php \Drupal\private_message\Entity\PrivateMessageThread::getLastAccessTimestamp()
Get the last access timestamp for the given user.
Parameters
\Drupal\Core\Session\AccountInterface $account: The user whose last access time should be retrieved.
Return value
int The timestamp at which the user last accessed the thread
Overrides PrivateMessageThreadInterface::getLastAccessTimestamp
File
- src/
Entity/ PrivateMessageThread.php, line 181
Class
- PrivateMessageThread
- Defines the Private Message Thread entity.
Namespace
Drupal\private_message\EntityCode
public function getLastAccessTimestamp(AccountInterface $account) {
$last_access = $this
->getLastAccessTime($account);
return $last_access ? $last_access->entity
->get('access_time')->value : FALSE;
}