ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilCalendarRecurrenceExclusion.php
Go to the documentation of this file.
1
<?php
2
/*
3
+-----------------------------------------------------------------------------+
4
| ILIAS open source |
5
+-----------------------------------------------------------------------------+
6
| Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7
| |
8
| This program is free software; you can redistribute it and/or |
9
| modify it under the terms of the GNU General Public License |
10
| as published by the Free Software Foundation; either version 2 |
11
| of the License, or (at your option) any later version. |
12
| |
13
| This program is distributed in the hope that it will be useful, |
14
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
| GNU General Public License for more details. |
17
| |
18
| You should have received a copy of the GNU General Public License |
19
| along with this program; if not, write to the Free Software |
20
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21
+-----------------------------------------------------------------------------+
22
*/
23
29
class
ilCalendarRecurrenceExclusion
30
{
31
protected
?
ilDate
$exclusion
= null;
32
protected
int
$cal_id
= 0;
33
protected
int
$exclusion_id
= 0;
34
35
protected
?
ilDBInterface
$db
;
36
37
public
function
__construct
(
int
$a_exclusion_id = 0)
38
{
39
global
$DIC
;
40
41
$this->db = $DIC->database();
42
$this->exclusion_id = $a_exclusion_id;
43
if
($this->
getId
()) {
44
$this->
read
();
45
}
46
}
47
48
public
function
getId
():
int
49
{
50
return
$this->exclusion_id
;
51
}
52
53
public
function
getEntryId
():
int
54
{
55
return
$this->cal_id
;
56
}
57
58
public
function
setEntryId
(
int
$a_id)
59
{
60
$this->cal_id = $a_id;
61
}
62
63
public
function
getDate
(): ?
ilDate
64
{
65
return
$this->exclusion instanceof
ilDate
? $this->exclusion : null;
66
}
67
71
public
function
setDate
(?
ilDate
$dt = null): void
72
{
73
$this->exclusion = $dt;
74
}
75
76
public
function
toICal
(): string
77
{
78
$entry =
new
ilCalendarEntry
($this->
getEntryId
());
79
$start = $entry->getStart();
80
81
if
($entry->isFullday()) {
82
return
'EXDATE;VALUE=DATE:'
. $this->
getDate
()->get(
IL_CAL_FKT_DATE
,
'Ymd'
);
83
}
else
{
84
return
'EXDATE:'
.
85
$this->
getDate
()->get(
IL_CAL_FKT_DATE
,
'Ymd'
,
ilTimeZone::UTC
) .
86
'T'
. $start->get(
IL_CAL_FKT_DATE
,
'His'
,
ilTimeZone::UTC
) .
'Z'
;
87
}
88
}
89
90
public
function
save
():
int
91
{
92
if
(!$this->
getDate
()) {
93
return
0;
94
}
95
96
$query
=
"INSERT INTO cal_rec_exclusion (excl_id,cal_id,excl_date) "
.
97
"VALUES( "
.
98
$this->db->quote($next_id = $this->db->nextId(
'cal_rec_exclusion'
),
'integer'
) .
', '
.
99
$this->db->quote($this->getEntryId(),
'integer'
) .
', '
.
100
$this->db->quote($this->getDate()->get(
IL_CAL_DATE
,
''
,
'UTC'
),
'timestamp'
) .
101
')'
;
102
$this->db->manipulate(
$query
);
103
104
$this->exclusion_id = $next_id;
105
return
$this->
getId
();
106
}
107
108
protected
function
read
()
109
{
110
$query
=
"SELECT * FROM cal_rec_exclusion WHERE excl_id = "
. $this->db->quote($this->
getId
(),
'integer'
);
111
$res
= $this->db->query(
$query
);
112
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
113
$this->cal_id = $row->cal_id;
114
$this->
setDate
(
new
ilDate
((
string
) $row->excl_date,
IL_CAL_DATE
));
115
}
116
}
117
}
ilCalendarRecurrenceExclusion\read
read()
Definition:
class.ilCalendarRecurrenceExclusion.php:108
ilDate
$res
$res
Definition:
ltiservices.php:69
ilCalendarEntry
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilCalendarEntry.php:27
ilCalendarRecurrenceExclusion\$db
ilDBInterface $db
Definition:
class.ilCalendarRecurrenceExclusion.php:35
ilTimeZone\UTC
const UTC
Definition:
class.ilTimeZone.php:40
ilCalendarRecurrenceExclusion\$exclusion_id
int $exclusion_id
Definition:
class.ilCalendarRecurrenceExclusion.php:33
ilCalendarRecurrenceExclusion\$cal_id
int $cal_id
Definition:
class.ilCalendarRecurrenceExclusion.php:32
ilCalendarRecurrenceExclusion\getEntryId
getEntryId()
Definition:
class.ilCalendarRecurrenceExclusion.php:53
ilCalendarRecurrenceExclusion\__construct
__construct(int $a_exclusion_id=0)
Definition:
class.ilCalendarRecurrenceExclusion.php:37
ilCalendarRecurrenceExclusion\$exclusion
ilDate $exclusion
Definition:
class.ilCalendarRecurrenceExclusion.php:31
ilCalendarRecurrenceExclusion\getDate
getDate()
Definition:
class.ilCalendarRecurrenceExclusion.php:63
$DIC
global $DIC
Definition:
feed.php:28
ilCalendarRecurrenceExclusion\setEntryId
setEntryId(int $a_id)
Definition:
class.ilCalendarRecurrenceExclusion.php:58
ilCalendarRecurrenceExclusion\toICal
toICal()
Definition:
class.ilCalendarRecurrenceExclusion.php:76
IL_CAL_FKT_DATE
const IL_CAL_FKT_DATE
Definition:
class.ilDateTime.php:10
ilCalendarRecurrenceExclusion\setDate
setDate(?ilDate $dt=null)
Set exclusion date.
Definition:
class.ilCalendarRecurrenceExclusion.php:71
ilDBInterface
$query
$query
Definition:
proxy_ylocal.php:13
ilCalendarRecurrenceExclusion\save
save()
Definition:
class.ilCalendarRecurrenceExclusion.php:90
IL_CAL_DATE
const IL_CAL_DATE
Definition:
class.ilDateTime.php:8
ilCalendarRecurrenceExclusion
Stores exclusion dates for calendar recurrences.
Definition:
class.ilCalendarRecurrenceExclusion.php:29
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:29
ilCalendarRecurrenceExclusion\getId
getId()
Definition:
class.ilCalendarRecurrenceExclusion.php:48
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
Services
Calendar
classes
class.ilCalendarRecurrenceExclusion.php
Generated on Sun Apr 6 2025 22:01:58 for ILIAS by
1.8.13 (using
Doxyfile
)