19 declare(strict_types=1);
25 public function __construct(
private readonly ILDBInterface $db)
31 return null !== $this->db->fetchAssoc($this->db->queryF(
32 'SELECT 1 FROM ' . $this::TABLE_NAME .
' WHERE obj_id = %s AND usr_id = %s AND setting = %s LIMIT 1',
40 if (!$this->
has($obj, $user->
getId(), $type)) {
41 $this->db->insert(
'il_dcl_notification', [
51 $this->db->manipulateF(
52 'DELETE FROM ' . $this::TABLE_NAME .
' WHERE obj_id = %s AND usr_id = %s AND setting = %s',
54 [$obj->
getId(), $user->getId(), $type->value]
60 $this->db->manipulateF(
61 'DELETE FROM ' . $this::TABLE_NAME .
' WHERE obj_id = %s AND usr_id = %s',
69 $this->db->manipulateF(
70 'DELETE FROM ' . $this::TABLE_NAME .
' WHERE obj_id = %s',
78 $this->db->manipulateF(
79 'DELETE FROM ' . $this::TABLE_NAME .
' WHERE usr_id = %s',
deleteForUser(int $user_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
add(ilObjDataCollection $obj, ilObjUser $user, ilDclNotificationType $type)
clear(ilObjDataCollection $obj, ilObjUser $user)
__construct(private readonly ILDBInterface $db)
deleteForObject(ilObjDataCollection $obj)
has(ilObjDataCollection $obj, int $user_id, ilDclNotificationType $type)