ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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

public

Parameters
intcal id
Returns

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

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

69  {
70  if ($recs = self::_getRecurrences($a_cal_id)) {
71  return $recs[0];
72  }
73  $new_rec = new ilCalendarRecurrence();
74  $new_rec->setEntryId($a_cal_id);
75  return $new_rec;
76  }
+ Here is the caller graph for this function:

◆ _getRecurrences()

static ilCalendarRecurrences::_getRecurrences (   $a_cal_id)
static

get all recurrences of an appointment

public

Parameters
intcal_id
Returns
ilCalendarRecurrence[]

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

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

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

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  $recurrences = [];
54  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
55  $recurrences[] = new ilCalendarRecurrence($row->rule_id);
56  }
57  return $recurrences;
58  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

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