ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 66 of file class.ilCalendarRecurrences.php.

67 {
68 if($recs = self::_getRecurrences($a_cal_id))
69 {
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 $ilDB;
47
48 $query = "SELECT rule_id FROM cal_recurrence_rules ".
49 "WHERE cal_id = ".$ilDB->quote($a_cal_id ,'integer')." ";
50 $res = $ilDB->query($query);
51 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
52 {
53 $recurrences[] = new ilCalendarRecurrence($row->rule_id);
54 }
55 return $recurrences ? $recurrences : array();
56 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB

References $ilDB, $query, $res, $row, and DB_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: