ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCalendarRecurrences Class Reference
+ Collaboration diagram for ilCalendarRecurrences:

Static Public Member Functions

static _getRecurrences (int $a_cal_id)
 get all recurrences of an appointment More...
 
static _getFirstRecurrence ($a_cal_id)
 

Detailed Description

Member Function Documentation

◆ _getFirstRecurrence()

static ilCalendarRecurrences::_getFirstRecurrence (   $a_cal_id)
static

Definition at line 44 of file class.ilCalendarRecurrences.php.

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 }
Model of calendar entry recurrcences based on iCalendar-RFC-5545.
static _getRecurrences(int $a_cal_id)
get all recurrences of an appointment

References _getRecurrences().

Referenced by ilCalendarAppointmentGUI\initAppointment(), ilCalendarRecurrenceTableGUI\parse(), ilCalendarAppointmentsTableGUI\setAppointments(), and ilCalendarChangedAppointmentsTableGUI\setAppointments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getRecurrences()

static ilCalendarRecurrences::_getRecurrences ( int  $a_cal_id)
static

get all recurrences of an appointment

Definition at line 29 of file class.ilCalendarRecurrences.php.

29 : 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 }
$res
Definition: ltiservices.php:69
global $DIC
Definition: shib_login.php:26

References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by _getFirstRecurrence(), ilCalendarAppointmentGUI\askDelete(), ilCalendarAppointmentGUI\askEdit(), ilCalendarSchedule\calculate(), ilCalendarExport\createRecurrences(), and ilCalendarExport\isRepeatingAppointment().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: