public function deleteTrivialNotifications($notifications)
{
$notificationDao = DAORegistry::getDAO('NotificationDAO');
foreach ($notifications as $notification) {
// Delete only trivial notifications.
if ($notification->getLevel() == NOTIFICATION_LEVEL_TRIVIAL) {
$notificationDao->deleteById($notification->getId(), $notification->getUserId());
}
}
}