ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ilCalendarRecurrences.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
24
class
ilCalendarRecurrences
25
{
29
public
static
function
_getRecurrences
(
int
$a_cal_id): array
30
{
31
global
$DIC
;
32
33
$ilDB
= $DIC[
'ilDB'
];
34
$query =
"SELECT rule_id FROM cal_recurrence_rules "
.
35
"WHERE cal_id = "
.
$ilDB
->quote($a_cal_id,
'integer'
) .
" "
;
36
$res
=
$ilDB
->query($query);
37
$recurrences = [];
38
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
39
$recurrences[] =
new
ilCalendarRecurrence
((
int
) $row->rule_id);
40
}
41
return
$recurrences;
42
}
43
44
public
static
function
_getFirstRecurrence
($a_cal_id):
ilCalendarRecurrence
45
{
46
$recs = self::_getRecurrences($a_cal_id);
47
if
(count($recs)) {
48
return
$recs[0];
49
}
50
$new_rec =
new
ilCalendarRecurrence
();
51
$new_rec->setEntryId($a_cal_id);
52
return
$new_rec;
53
}
54
}
$res
$res
Definition:
ltiservices.php:66
ilCalendarRecurrence
ilCalendarRecurrences\_getFirstRecurrence
static _getFirstRecurrence($a_cal_id)
Definition:
class.ilCalendarRecurrences.php:44
ilCalendarRecurrences\_getRecurrences
static _getRecurrences(int $a_cal_id)
get all recurrences of an appointment
Definition:
class.ilCalendarRecurrences.php:29
$ilDB
$ilDB
Definition:
storeScorm2004.php:25
$DIC
global $DIC
Definition:
shib_login.php:26
ilCalendarRecurrences
Definition:
class.ilCalendarRecurrences.php:24
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:29
components
ILIAS
Calendar
classes
class.ilCalendarRecurrences.php
Generated on Sun Aug 31 2025 23:02:28 for ILIAS by
1.8.13 (using
Doxyfile
)