returns an indexed array, each element of this array is an associative array representing an event. This associative array has the following keys: 0: start_time, hour and minute in which the event starts hh:mm 1: id_cal, event id 2: insertby, who inserted the event (id_person) 3: type, event type (avail, call, recall, meeting, work, avail_, prjwork, prjhours, note) 4: description 5: month, month of the event (ex. 9) 6: dayofmonth, day of month for the start date (es. 23) 7: end_time, hour and minute in which the event ends hh:mm 8: amount 9: id_categ 10: recur, true if the event is a generation from a recurrent event 11: every, event repeated every X days, weeks, months (see recur) 12: length, how many hours min the event lasted (example 2:30) persons formatted list of person partecipating to the event ex. (surname name organization, ...)
Parameters:
$sdate
$sdate
string start date in iso format (events starting in this date are included)
$edate
$edate
string end date in iso format (events starting in this date are included)
$id_person
$id_person
integer flags events related to a given person the person must be a partecipant to the event or the person who inserted (insertby) the event. 0 means don't flag; the parameter is optional and defaults to 0
$type
$type
array gets only events given types (avail, call, recall, meeting), an empty array means don't filter, the parameter is optional and defaults to the empty array
Clears the cache and generates the repeated events cache The event cache is stored in the cal table.
A cached event has recur=cache and every contains the id_cal for the base event that generated the cached event. We cache events starting from 2002-01-01 to the end of two years from now, so for example in 2003 we arrive to 2005-12-31.
sorts events by start time. Meetings are before availabilities. we need this order to suppress easily used avails. This method is used by usort (user defined sort) in listEvents method.