ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilCalendarSchedule Class Reference

Represents a list of calendar appointments (including recurring events) for a specific user in a given time range. More...

+ Collaboration diagram for ilCalendarSchedule:

Public Member Functions

 __construct (ilDate $seed, $a_type, $a_user_id=0)
 Constructor. More...
 
 getEventsLimit ()
 get current limit of events More...
 
 setEventsLimit ($a_limit)
 Set events limit. More...
 
 addSubitemCalendars ($a_status)
 Enable subitem calendars (session calendars for courses) More...
 
 enabledSubitemCalendars ()
 Are subitem calendars enabled. More...
 
 addFilter (ilCalendarScheduleFilter $a_filter)
 Add filter. More...
 
 getByDay (ilDate $a_start, $a_timezone)
 get byday More...
 
 calculate ()
 calculate More...
 
 getScheduledEvents ()
 
 getChangedEvents ($a_include_subitem_calendars=false)
 get new/changed events More...
 
 getEvents ()
 Read events (will be moved to another class, since only active and/or visible calendars are shown) More...
 

Data Fields

const TYPE_DAY = 1
 
const TYPE_WEEK = 2
 
const TYPE_MONTH = 3
 
const TYPE_INBOX = 4
 
const TYPE_PD_UPCOMING = 5
 

Protected Member Functions

 areEventsLimited ()
 Check if events are limited. More...
 
 filterCategories (array $a_cats)
 
 modifyEventByFilters (ilCalendarEntry $event)
 
 addCustomEvents (ilDate $start, ilDate $end, array $categories)
 
 initPeriod (ilDate $seed)
 init period of events More...
 

Protected Attributes

 $limit_events = -1
 
 $schedule = array()
 
 $timezone
 
 $weekstart
 
 $type = 0
 
 $subitems_enabled = false
 
 $start = null
 
 $end = null
 
 $user = null
 
 $user_settings = null
 
 $db = null
 
 $filters = array()
 

Detailed Description

Represents a list of calendar appointments (including recurring events) for a specific user in a given time range.

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

Definition at line 41 of file class.ilCalendarSchedule.php.

Constructor & Destructor Documentation

◆ __construct()

ilCalendarSchedule::__construct ( ilDate  $seed,
  $a_type,
  $a_user_id = 0 
)

Constructor.

public

Parameters
ilDateseed date
inttype of schedule (TYPE_DAY,TYPE_WEEK or TYPE_MONTH)
intuser_id

Definition at line 73 of file class.ilCalendarSchedule.php.

References $a_type, $ilDB, $ilUser, ilCalendarCategories\_getInstance(), ilCalendarUserSettings\_getInstanceByUserId(), addFilter(), initPeriod(), ilCalendarCategories\MODE_CONSULTATION, ilCalendarCategories\MODE_PORTFOLIO_CONSULTATION, timezone, and user().

74  {
75  global $ilUser,$ilDB;
76 
77  $this->db = $ilDB;
78 
79  $this->type = $a_type;
80  $this->initPeriod($seed);
81 
82  if(!$a_user_id || $a_user_id == $ilUser->getId())
83  {
84  $this->user = $ilUser;
85  }
86  else
87  {
88  $this->user = new ilObjUser($a_user_id);
89  }
90  $this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
91  $this->weekstart = $this->user_settings->getWeekStart();
92  $this->timezone = $this->user->getTimeZone();
93 
94 
95  // category / event filters
96 
97  include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
98 
99  // portfolio does custom filter handling (booking group ids)
101  {
102  // consultation hour calendar views do not mind calendar category visibility
104  {
105  // this is the "default" filter which handles currently hidden categories for the user
106  include_once('./Services/Calendar/classes/class.ilCalendarScheduleFilterHidden.php');
107  $this->addFilter(new ilCalendarScheduleFilterHidden($this->user->getId()));
108  }
109  else
110  {
111  // handle booking visibility (target object, booked out)
112  include_once('./Services/Calendar/classes/class.ilCalendarScheduleFilterBookings.php');
113  $this->addFilter(new ilCalendarScheduleFilterBookings($this->user->getId()));
114  }
115 
116  // exercise
117  include_once './Services/Calendar/classes/class.ilCalendarScheduleFilterExercise.php';
118  $this->addFilter(new ilCalendarScheduleFilterExercise($this->user->getId()));
119  }
120 
121  }
Set timezone
Calendar schedule filter for consultation hour bookings.
static _getInstanceByUserId($a_user_id)
get singleton instance
user()
Definition: user.php:4
$a_type
Definition: workflow.php:93
Calendar schedule filter for hidden categories.
$ilUser
Definition: imgupload.php:18
Calendar schedule filter for exercises.
static _getInstance($a_usr_id=0)
get singleton instance
initPeriod(ilDate $seed)
init period of events
addFilter(ilCalendarScheduleFilter $a_filter)
Add filter.
global $ilDB
+ Here is the call graph for this function:

Member Function Documentation

◆ addCustomEvents()

ilCalendarSchedule::addCustomEvents ( ilDate  $start,
ilDate  $end,
array  $categories 
)
protected

Definition at line 387 of file class.ilCalendarSchedule.php.

References array.

Referenced by getChangedEvents(), and getEvents().

388  {
389  $new_events = array();
390  foreach($this->filters as $filter)
391  {
392  $events_by_filter = $filter->addCustomEvents($start, $end, $categories);
393  if($events_by_filter)
394  {
395  $new_events = array_merge($new_events, $events_by_filter);
396  }
397  }
398  return $new_events;
399  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ addFilter()

ilCalendarSchedule::addFilter ( ilCalendarScheduleFilter  $a_filter)

Add filter.

Parameters
ilCalendarScheduleFilter$a_filter

Definition at line 174 of file class.ilCalendarSchedule.php.

Referenced by __construct().

175  {
176  $this->filters[] = $a_filter;
177  }
+ Here is the caller graph for this function:

◆ addSubitemCalendars()

ilCalendarSchedule::addSubitemCalendars (   $a_status)

Enable subitem calendars (session calendars for courses)

Parameters

Definition at line 155 of file class.ilCalendarSchedule.php.

156  {
157  $this->subitems_enabled = $a_status;
158  }

◆ areEventsLimited()

ilCalendarSchedule::areEventsLimited ( )
protected

Check if events are limited.

Returns
type

Definition at line 127 of file class.ilCalendarSchedule.php.

Referenced by calculate().

128  {
129  return $this->limit_events != -1;
130  }
+ Here is the caller graph for this function:

◆ calculate()

ilCalendarSchedule::calculate ( )

calculate

protected

Definition at line 231 of file class.ilCalendarSchedule.php.

References $counter, $duration, ilCalendarCategoryAssignments\_getAppointmentCalendars(), ilCalendarRecurrences\_getRecurrences(), areEventsLimited(), array, getEvents(), getEventsLimit(), IL_CAL_FKT_GETDATE, IL_CAL_UNIX, ilUtil\sortArray(), time, and timezone.

232  {
233  $events = $this->getEvents();
234 
235  // we need category type for booking handling
236  $ids = array();
237  foreach($events as $event)
238  {
239  $ids[] = $event->getEntryId();
240  }
241 
242  include_once('Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
244  include_once('Services/Calendar/classes/class.ilCalendarCategory.php');
245  $cat_types = array();
246  foreach(array_unique($cat_map) as $cat_id)
247  {
248  $cat = new ilCalendarCategory($cat_id);
249  $cat_types[$cat_id] = $cat->getType();
250  }
251 
252  $counter = 0;
253  foreach($events as $event)
254  {
255  // Calculdate recurring events
256  include_once('Services/Calendar/classes/class.ilCalendarRecurrences.php');
257  if($recs = ilCalendarRecurrences::_getRecurrences($event->getEntryId()))
258  {
259  $duration = $event->getEnd()->get(IL_CAL_UNIX) - $event->getStart()->get(IL_CAL_UNIX);
260  foreach($recs as $rec)
261  {
262  $calc = new ilCalendarRecurrenceCalculator($event,$rec);
263  foreach($calc->calculateDateList($this->start,$this->end)->get() as $rec_date)
264  {
265  if($this->type == self::TYPE_PD_UPCOMING &&
266  $rec_date->get(IL_CAL_UNIX) < time())
267  {
268  continue;
269  }
270 
271  $this->schedule[$counter]['event'] = $event;
272  $this->schedule[$counter]['dstart'] = $rec_date->get(IL_CAL_UNIX);
273  $this->schedule[$counter]['dend'] = $this->schedule[$counter]['dstart'] + $duration;
274  $this->schedule[$counter]['fullday'] = $event->isFullday();
275  $this->schedule[$counter]['category_id'] = $cat_map[$event->getEntryId()];
276  $this->schedule[$counter]['category_type'] = $cat_types[$cat_map[$event->getEntryId()]];
277 
278  switch($this->type)
279  {
280  case self::TYPE_DAY:
281  case self::TYPE_WEEK:
282  // store date info (used for calculation of overlapping events)
283  $tmp_date = new ilDateTime($this->schedule[$counter]['dstart'],IL_CAL_UNIX,$this->timezone);
284  $this->schedule[$counter]['start_info'] = $tmp_date->get(IL_CAL_FKT_GETDATE,'',$this->timezone);
285 
286  $tmp_date = new ilDateTime($this->schedule[$counter]['dend'],IL_CAL_UNIX,$this->timezone);
287  $this->schedule[$counter]['end_info'] = $tmp_date->get(IL_CAL_FKT_GETDATE,'',$this->timezone);
288  break;
289 
290  default:
291  break;
292  }
293  $counter++;
294  if($this->type != self::TYPE_PD_UPCOMING &&
295  $this->areEventsLimited() && $counter >= $this->getEventsLimit())
296  {
297  break;
298  }
299 
300  }
301  }
302  }
303  else
304  {
305  $this->schedule[$counter]['event'] = $event;
306  $this->schedule[$counter]['dstart'] = $event->getStart()->get(IL_CAL_UNIX);
307  $this->schedule[$counter]['dend'] = $event->getEnd()->get(IL_CAL_UNIX);
308  $this->schedule[$counter]['fullday'] = $event->isFullday();
309  $this->schedule[$counter]['category_id'] = $cat_map[$event->getEntryId()];
310  $this->schedule[$counter]['category_type'] = $cat_types[$cat_map[$event->getEntryId()]];
311 
312  if(!$event->isFullday())
313  {
314  switch($this->type)
315  {
316  case self::TYPE_DAY:
317  case self::TYPE_WEEK:
318  // store date info (used for calculation of overlapping events)
319  $tmp_date = new ilDateTime($this->schedule[$counter]['dstart'],IL_CAL_UNIX,$this->timezone);
320  $this->schedule[$counter]['start_info'] = $tmp_date->get(IL_CAL_FKT_GETDATE,'',$this->timezone);
321 
322  $tmp_date = new ilDateTime($this->schedule[$counter]['dend'],IL_CAL_UNIX,$this->timezone);
323  $this->schedule[$counter]['end_info'] = $tmp_date->get(IL_CAL_FKT_GETDATE,'',$this->timezone);
324  break;
325 
326  default:
327  break;
328  }
329  }
330  $counter++;
331  if($this->type != self::TYPE_PD_UPCOMING &&
332  $this->areEventsLimited() && $counter >= $this->getEventsLimit())
333  {
334  break;
335  }
336  }
337  }
338 
339  if($this->type == self::TYPE_PD_UPCOMING)
340  {
341  $this->schedule = ilUtil::sortArray($this->schedule, "dstart", "asc", true);
342  if($this->areEventsLimited() && sizeof($this->schedule) >= $this->getEventsLimit())
343  {
344  $this->schedule = array_slice($this->schedule, 0, $this->getEventsLimit());
345  }
346  }
347  }
Set timezone
static _getRecurrences($a_cal_id)
get all recurrences of an appointment
areEventsLimited()
Check if events are limited.
getEventsLimit()
get current limit of events
Stores calendar categories.
const IL_CAL_UNIX
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
$counter
Calculates an ilDateList for a given calendar entry and recurrence rule.
Date and time handling
getEvents()
Read events (will be moved to another class, since only active and/or visible calendars are shown) ...
Create styles array
The data for the language used.
const IL_CAL_FKT_GETDATE
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static _getAppointmentCalendars($a_cal_ids)
lookup calendars for appointment ids
+ Here is the call graph for this function:

◆ enabledSubitemCalendars()

ilCalendarSchedule::enabledSubitemCalendars ( )

Are subitem calendars enabled.

Returns

Definition at line 164 of file class.ilCalendarSchedule.php.

References $subitems_enabled.

Referenced by getEvents().

165  {
166  return (bool) $this->subitems_enabled;
167  }
+ Here is the caller graph for this function:

◆ filterCategories()

ilCalendarSchedule::filterCategories ( array  $a_cats)
protected

Definition at line 354 of file class.ilCalendarSchedule.php.

Referenced by getChangedEvents(), and getEvents().

355  {
356  if(!sizeof($a_cats))
357  {
358  return;
359  }
360 
361  foreach($this->filters as $filter)
362  {
363  if(sizeof($a_cats))
364  {
365  $a_cats = $filter->filterCategories($a_cats);
366  }
367  }
368 
369  return $a_cats;
370  }
+ Here is the caller graph for this function:

◆ getByDay()

ilCalendarSchedule::getByDay ( ilDate  $a_start,
  $a_timezone 
)

get byday

public

Parameters
ilDatestart

Definition at line 186 of file class.ilCalendarSchedule.php.

References $counter, $schedule, $start, $timezone, array, ilDateTime\DAY, ilDate\get(), ilDateTime\get(), IL_CAL_DATETIME, IL_CAL_UNIX, ilDateTime\increment(), and timezone.

187  {
189  $fstart = new ilDate($a_start->get(IL_CAL_UNIX),IL_CAL_UNIX);
190  $fend = clone $fstart;
191 
192  $f_unix_start = $fstart->get(IL_CAL_UNIX);
193  $fend->increment(ilDateTime::DAY,1);
194  $f_unix_end = $fend->get(IL_CAL_UNIX);
195 
196  $unix_start = $start->get(IL_CAL_UNIX);
197  $start->increment(ilDateTime::DAY,1);
198  $unix_end = $start->get(IL_CAL_UNIX);
199 
200  $counter = 0;
201 
202  $tmp_date = new ilDateTime($unix_start,IL_CAL_UNIX,$this->timezone);
203  $tmp_schedule = array();
204  foreach($this->schedule as $schedule)
205  {
206  if($schedule['fullday'])
207  {
208  if(($f_unix_start == $schedule['dstart']) or
209  $f_unix_start == $schedule['dend'] or
210  ($f_unix_start > $schedule['dstart'] and $f_unix_end <= $schedule['dend']))
211  {
212  $tmp_schedule[] = $schedule;
213  }
214  }
215  elseif(($schedule['dstart'] == $unix_start) or
216  (($schedule['dstart'] <= $unix_start) and ($schedule['dend'] > $unix_start)) or
217  (($schedule['dstart'] >= $unix_start) and ($schedule['dstart'] < $unix_end)))
218  {
219  $tmp_schedule[] = $schedule;
220  }
221  }
222  return $tmp_schedule;
223  }
Set timezone
const IL_CAL_DATETIME
const IL_CAL_UNIX
get($a_format, $a_format_str='', $a_tz='')
get formatted date
$counter
Class for single dates.
Date and time handling
get($a_format, $a_format_str='', $a_tz='')
get formatted date
increment($a_type, $a_count=1)
increment
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getChangedEvents()

ilCalendarSchedule::getChangedEvents (   $a_include_subitem_calendars = false)

get new/changed events

Parameters
bool$a_include_subitem_calendarsE.g include session calendars of courses.
Returns
object $events[] Array of changed events protected

Definition at line 409 of file class.ilCalendarSchedule.php.

References $ilDB, $query, $res, $row, $start, ilCalendarCategories\_getInstance(), addCustomEvents(), array, date, ilDBConstants\FETCHMODE_OBJECT, filterCategories(), IL_CAL_DATE, IL_CAL_DATETIME, IL_CAL_MONTH, modifyEventByFilters(), time, and user().

410  {
411  global $ilDB;
412 
413  include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
414  $cats = ilCalendarCategories::_getInstance($this->user->getId())->getCategories($a_include_subitem_calendars);
415  $cats = $this->filterCategories($cats);
416 
417  if(!count($cats))
418  {
419  return array();
420  }
421 
422  $start = new ilDate(date('Y-m-d',time()),IL_CAL_DATE);
423  $start->increment(IL_CAL_MONTH,-1);
424 
425  $query = "SELECT ce.cal_id cal_id FROM cal_entries ce ".
426  "JOIN cal_cat_assignments ca ON ca.cal_id = ce.cal_id ".
427  "WHERE last_update > ".$ilDB->quote($start->get(IL_CAL_DATETIME),'timestamp')." ".
428  "AND ".$ilDB->in('ca.cat_id',$cats,false,'integer').' '.
429  "ORDER BY last_update";
430  $res = $this->db->query($query);
431 
432  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
433  {
434  $event = new ilCalendarEntry($row->cal_id);
435  $valid_event = $this->modifyEventByFilters($event);
436  if($valid_event)
437  {
438  $events[] = $valid_event;
439  }
440  }
441 
442  foreach($this->addCustomEvents($this->start, $this->end, $cats) as $event)
443  {
444  $events[] = $event;
445  }
446 
447  return $events ? $events : array();
448  }
Model for a calendar entry.
modifyEventByFilters(ilCalendarEntry $event)
const IL_CAL_DATETIME
const IL_CAL_MONTH
user()
Definition: user.php:4
Class for single dates.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static _getInstance($a_usr_id=0)
get singleton instance
Create styles array
The data for the language used.
const IL_CAL_DATE
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
addCustomEvents(ilDate $start, ilDate $end, array $categories)
+ Here is the call graph for this function:

◆ getEvents()

ilCalendarSchedule::getEvents ( )

Read events (will be moved to another class, since only active and/or visible calendars are shown)

protected

Definition at line 456 of file class.ilCalendarSchedule.php.

References $ilDB, $query, $res, $row, ilCalendarCategories\_getInstance(), addCustomEvents(), array, enabledSubitemCalendars(), ilDBConstants\FETCHMODE_OBJECT, filterCategories(), IL_CAL_DATETIME, IL_CAL_UNIX, modifyEventByFilters(), and user().

Referenced by calculate().

457  {
458  global $ilDB;
459 
460  include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
461  $cats = ilCalendarCategories::_getInstance($this->user->getId())->getCategories($this->enabledSubitemCalendars());
462  $cats = $this->filterCategories($cats);
463 
464  if(!count($cats))
465  {
466  return array();
467  }
468 
469  // TODO: optimize
470  $query = "SELECT ce.cal_id cal_id".
471  " FROM cal_entries ce".
472  " LEFT JOIN cal_recurrence_rules crr ON (ce.cal_id = crr.cal_id)".
473  " JOIN cal_cat_assignments ca ON (ca.cal_id = ce.cal_id)";
474 
475  if($this->type != self::TYPE_INBOX)
476  {
477  $query .= " WHERE ((starta <= ".$this->db->quote($this->end->get(IL_CAL_DATETIME,'','UTC'),'timestamp').
478  " AND enda >= ".$this->db->quote($this->start->get(IL_CAL_DATETIME,'','UTC'),'timestamp').")".
479  " OR (starta <= ".$this->db->quote($this->end->get(IL_CAL_DATETIME,'','UTC'),'timestamp').
480  " AND NOT rule_id IS NULL))";
481  }
482  else
483  {
484  $date = new ilDateTime(mktime(0, 0, 0), IL_CAL_UNIX);
485  $query .= " WHERE starta >= ".$this->db->quote($date->get(IL_CAL_DATETIME,'','UTC'),'timestamp');
486  }
487 
488  $query .= " AND ".$ilDB->in('ca.cat_id',$cats,false,'integer').
489  " ORDER BY starta";
490 
491  $res = $this->db->query($query);
492 
493  $events = array();
494  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
495  {
496  $event = new ilCalendarEntry($row->cal_id);
497  $valid_event = $this->modifyEventByFilters($event);
498  if($valid_event)
499  {
500  $events[] = $valid_event;
501  }
502  }
503 
504  foreach($this->addCustomEvents($this->start, $this->end, $cats) as $event)
505  {
506  $events[] = $event;
507  }
508 
509  return $events;
510  }
Model for a calendar entry.
modifyEventByFilters(ilCalendarEntry $event)
const IL_CAL_DATETIME
enabledSubitemCalendars()
Are subitem calendars enabled.
const IL_CAL_UNIX
user()
Definition: user.php:4
Date and time handling
static _getInstance($a_usr_id=0)
get singleton instance
Create styles array
The data for the language used.
global $ilDB
addCustomEvents(ilDate $start, ilDate $end, array $categories)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEventsLimit()

ilCalendarSchedule::getEventsLimit ( )

get current limit of events

Returns
type

Definition at line 136 of file class.ilCalendarSchedule.php.

References $limit_events.

Referenced by calculate().

137  {
138  return $this->limit_events;
139  }
+ Here is the caller graph for this function:

◆ getScheduledEvents()

ilCalendarSchedule::getScheduledEvents ( )

Definition at line 349 of file class.ilCalendarSchedule.php.

References $schedule, and array.

350  {
351  return (array) $this->schedule;
352  }
Create styles array
The data for the language used.

◆ initPeriod()

ilCalendarSchedule::initPeriod ( ilDate  $seed)
protected

init period of events

protected

Parameters
ilDateseed
Returns

Definition at line 519 of file class.ilCalendarSchedule.php.

References $start, ilCalendarUtil\_getMaxDayOfMonth(), IL_CAL_DATE, IL_CAL_DAY, IL_CAL_FKT_DATE, IL_CAL_FKT_GETDATE, IL_CAL_MONTH, and ilDateTime\increment().

Referenced by __construct().

520  {
521  switch($this->type)
522  {
523  case self::TYPE_DAY:
524  $this->start = clone $seed;
525  $this->end = clone $seed;
526  $this->start->increment(IL_CAL_DAY,-2);
527  $this->end->increment(IL_CAL_DAY,2);
528  break;
529 
530  case self::TYPE_WEEK:
531  $this->start = clone $seed;
532  $start_info = $this->start->get(IL_CAL_FKT_GETDATE,'','UTC');
533  $day_diff = $this->weekstart - $start_info['isoday'];
534  if($day_diff == 7)
535  {
536  $day_diff = 0;
537  }
538  $this->start->increment(IL_CAL_DAY,$day_diff);
539  $this->start->increment(IL_CAL_DAY,-1);
540  $this->end = clone $this->start;
541  $this->end->increment(IL_CAL_DAY,9);
542  break;
543 
544  case self::TYPE_MONTH:
545  $year_month = $seed->get(IL_CAL_FKT_DATE,'Y-m','UTC');
546  list($year,$month) = explode('-',$year_month);
547 
548  $this->start = new ilDate($year_month.'-01',IL_CAL_DATE);
549  $this->start->increment(IL_CAL_DAY,-6);
550 
551  $this->end = new ilDate($year_month.'-'.ilCalendarUtil::_getMaxDayOfMonth($year,$month),IL_CAL_DATE);
552  $this->end->increment(IL_CAL_DAY,6);
553  break;
554 
555  case self::TYPE_PD_UPCOMING:
556  case self::TYPE_INBOX:
557  $this->start = $seed;
558  $this->end = clone $this->start;
559  $this->end->increment(IL_CAL_MONTH,3);
560  break;
561  }
562 
563  return true;
564  }
const IL_CAL_MONTH
static _getMaxDayOfMonth($a_year, $a_month)
get max day of month 2008,2 => 29
const IL_CAL_DAY
Class for single dates.
const IL_CAL_FKT_DATE
increment($a_type, $a_count=1)
increment
const IL_CAL_FKT_GETDATE
const IL_CAL_DATE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modifyEventByFilters()

ilCalendarSchedule::modifyEventByFilters ( ilCalendarEntry  $event)
protected

Definition at line 372 of file class.ilCalendarSchedule.php.

References $res, and ilLoggerFactory\getLogger().

Referenced by getChangedEvents(), and getEvents().

373  {
374  foreach($this->filters as $filter)
375  {
376  $res = $filter->modifyEvent($event);
377  if(!$res)
378  {
379  ilLoggerFactory::getLogger('crs')->debug('filtering failed for ' . get_class($filter));
380  return FALSE;
381  }
382  $event = $res;
383  }
384  return $event;
385  }
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEventsLimit()

ilCalendarSchedule::setEventsLimit (   $a_limit)

Set events limit.

Parameters
type$a_limit

Definition at line 145 of file class.ilCalendarSchedule.php.

146  {
147  $this->limit_events = $a_limit;
148  }

Field Documentation

◆ $db

ilCalendarSchedule::$db = null
protected

Definition at line 61 of file class.ilCalendarSchedule.php.

◆ $end

ilCalendarSchedule::$end = null
protected

Definition at line 58 of file class.ilCalendarSchedule.php.

◆ $filters

ilCalendarSchedule::$filters = array()
protected

Definition at line 62 of file class.ilCalendarSchedule.php.

◆ $limit_events

ilCalendarSchedule::$limit_events = -1
protected

Definition at line 49 of file class.ilCalendarSchedule.php.

Referenced by getEventsLimit().

◆ $schedule

ilCalendarSchedule::$schedule = array()
protected

Definition at line 50 of file class.ilCalendarSchedule.php.

Referenced by getByDay(), and getScheduledEvents().

◆ $start

ilCalendarSchedule::$start = null
protected

Definition at line 57 of file class.ilCalendarSchedule.php.

Referenced by getByDay(), getChangedEvents(), and initPeriod().

◆ $subitems_enabled

ilCalendarSchedule::$subitems_enabled = false
protected

Definition at line 55 of file class.ilCalendarSchedule.php.

Referenced by enabledSubitemCalendars().

◆ $timezone

ilCalendarSchedule::$timezone
protected

Definition at line 51 of file class.ilCalendarSchedule.php.

Referenced by getByDay().

◆ $type

ilCalendarSchedule::$type = 0
protected

Definition at line 53 of file class.ilCalendarSchedule.php.

◆ $user

ilCalendarSchedule::$user = null
protected

Definition at line 59 of file class.ilCalendarSchedule.php.

◆ $user_settings

ilCalendarSchedule::$user_settings = null
protected

Definition at line 60 of file class.ilCalendarSchedule.php.

◆ $weekstart

ilCalendarSchedule::$weekstart
protected

Definition at line 52 of file class.ilCalendarSchedule.php.

◆ TYPE_DAY

const ilCalendarSchedule::TYPE_DAY = 1

Definition at line 43 of file class.ilCalendarSchedule.php.

Referenced by ilCalendarDayGUI\show().

◆ TYPE_INBOX

const ilCalendarSchedule::TYPE_INBOX = 4

◆ TYPE_MONTH

const ilCalendarSchedule::TYPE_MONTH = 3

◆ TYPE_PD_UPCOMING

const ilCalendarSchedule::TYPE_PD_UPCOMING = 5

Definition at line 47 of file class.ilCalendarSchedule.php.

Referenced by ilCalendarBlockGUI\getData().

◆ TYPE_WEEK

const ilCalendarSchedule::TYPE_WEEK = 2

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

Referenced by ilCalendarWeekGUI\show().


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