public function OpignoMessageThread::markReadAll in Opigno messaging 8
Marks all unread treads as read.
1 string reference to 'OpignoMessageThread::markReadAll'
File
- src/
OpignoMessageThread.php, line 89
Class
- OpignoMessageThread
- Class OpignoMessageThread.
Namespace
Drupal\opigno_messagingCode
public function markReadAll() {
$ids = self::getUnreadThreadCount('id');
if ($ids) {
$db_connection = \Drupal::service('database');
$db_connection
->update('pm_thread_access_time')
->fields([
'access_time' => time(),
])
->condition('id', $ids, 'IN')
->execute();
}
return new JsonResponse([]);
}