3 declare(strict_types=1);
    25         $this->
lng = $DIC->language();
    26         $this->db = $DIC->database();
    27         $this->error = $DIC[
'ilErr'];
    29         $this->cal_id = $a_cal_id;
    38         $query = 
'DELETE FROM cal_notification ' .
    39             'WHERE user_id = ' . 
$ilDB->quote($a_usr_id, 
'integer');
    48         $query = 
'DELETE FROM cal_notification ' .
    49             'WHERE cal_id = ' . 
$ilDB->quote($a_cal_id, 
'integer');
    55         $this->cal_id = $a_id;
    74             if ($rcp_data[
'type'] == self::TYPE_USER) {
    77                 $this->error->appendMessage($this->
lng->txt(
'cal_err_invalid_notification_rcps'));
    84     public function save(): bool
    88             $query = 
'INSERT INTO cal_notification ' .
    89                 '(notification_id,cal_id, user_type, user_id, email) ' .
    91                 $this->db->quote($this->db->nextId(
'cal_notification'), 
'integer') . 
', ' .
    92                 $this->db->quote($this->getEntryId(), 
'integer') . 
', ' .
    93                 $this->db->quote((
int) $rcp[
'type'], 
'integer') . 
', ' .
    94                 $this->db->quote((
int) $rcp[
'usr_id'], 
'integer') . 
', ' .
    95                 $this->db->quote($rcp[
'email'], 
'text') .
    97             $this->db->manipulate($query);
   102     public function addRecipient(
int $a_type, 
int $a_usr_id = 0, 
string $a_email = 
''): void
   104         $this->rcps[] = array(
   106             'usr_id' => $a_usr_id,
   113         $this->rcps = array();
   118         $query = 
'DELETE FROM cal_notification ' .
   119             'WHERE cal_id = ' . $this->db->quote($this->
getEntryId(), 
'integer');
   120         $res = $this->db->manipulate($query);
   123     protected function read(): void
   129         $query = 
'SELECT * FROM cal_notification ' .
   130             'WHERE cal_id = ' . $this->db->quote($this->
getEntryId(), 
'integer');
   131         $res = $this->db->query($query);
   133         $this->rcps = array();
   136                 (
int) $row->user_type,
   147         $ilDB = $DIC[
'ilDB'];
   148         if (
$ilDB->tableExists(
'cal_notification')) {
   156                 'notification_id' => array(
'type' => 
'integer', 
'length' => 4, 
'notnull' => 
true),
   157                 'cal_id' => array(
'type' => 
'integer', 
'length' => 4, 
'notnull' => 
true, 
'default' => 0),
   158                 'user_type' => array(
'type' => 
'integer', 
'length' => 1, 
'notnull' => 
true, 
'default' => 0),
   159                 'user_id' => array(
'type' => 
'integer', 
'length' => 4, 
'notnull' => 
true, 
'default' => 0),
   160                 'email' => array(
'type' => 
'text', 
'length' => 64, 
'notnull' => 
false)
   163         $ilDB->addPrimaryKey(
   169         $ilDB->createSequence(
'cal_notification');
   170         $ilDB->addIndex(
'cal_notification', array(
'cal_id'), 
'i1');
 
static is_email(string $a_email, ilMailRfc822AddressParserFactory $mailAddressParserFactory=null)
This preg-based function checks whether an e-mail address is formally valid. 
 
static deleteUser(int $a_usr_id)
 
setRecipients(array $a_rcps)
 
__construct(int $a_cal_id=0)
 
static deleteCalendarEntry(int $a_cal_id)
 
addRecipient(int $a_type, int $a_usr_id=0, string $a_email='')