ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilCalendarRecurrences Class Reference
+ Collaboration diagram for ilCalendarRecurrences:

Static Public Member Functions

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

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Member Function Documentation

◆ _getFirstRecurrence()

static ilCalendarRecurrences::_getFirstRecurrence (   $a_cal_id)
static

get first recurrence

@access public

Parameters
intcal id
Returns

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

68 {
69 if ($recs = self::_getRecurrences($a_cal_id)) {
70 return $recs[0];
71 }
72 $new_rec = new ilCalendarRecurrence();
73 $new_rec->setEntryId($a_cal_id);
74 return $new_rec;
75 }

Referenced by ilCalendarExport\createVEVENT(), ilCalendarAppointmentGUI\initAppointment(), ilCalendarAppointmentsTableGUI\setAppointments(), and ilCalendarChangedAppointmentsTableGUI\setAppointments().

+ Here is the caller graph for this function:

◆ _getRecurrences()

static ilCalendarRecurrences::_getRecurrences (   $a_cal_id)
static

get all recurrences of an appointment

@access public

Parameters
intcal_id
Returns
array array of ilCalendarRecurrence

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

45 {
46 global $DIC;
47
48 $ilDB = $DIC['ilDB'];
49
50 $query = "SELECT rule_id FROM cal_recurrence_rules " .
51 "WHERE cal_id = " . $ilDB->quote($a_cal_id, 'integer') . " ";
52 $res = $ilDB->query($query);
53 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
54 $recurrences[] = new ilCalendarRecurrence($row->rule_id);
55 }
56 return $recurrences ? $recurrences : array();
57 }
$row
$query
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
global $ilDB

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

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

+ Here is the caller graph for this function:

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