dev.obliquid.com: obliquid
[ class tree: obliquid ] [ index: obliquid ] [ all elements ]

Class: calev

Source Location: Program_Root/classes/obliquid/calev.php

Class Overview


calev class, to play with calendar events


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 32]
calev class, to play with calendar events





[ Top ]


Class Variables

$user =

[line 35]

user class




Type:   mixed


[ Top ]



Class Methods


constructor calev [line 38]

void calev( )

Constructor





[ Top ]

method clearCache [line 290]

void clearCache( )

Deletes any previously cached repeated events





[ Top ]

method delete [line 265]

void delete( mixed $id_cal, [mixed $really_del = false])

Tells if the user can del the given event

If $really_del is true, the even is also deleted if permitted






[ Top ]

method getAllowedTypes [line 44]

void getAllowedTypes( )

Gets a list of allowed event types in an indexed array





[ Top ]

method getEnabledTypes [line 71]

void getEnabledTypes( )

Gets a list of enabled event types in an indexed array.

This is a subset of getAllowedTypes()






[ Top ]

method listEvents [line 116]

void &listEvents( $sdate $sdate, $edate $edate, [$id_person $id_person = 0], [$type $type = array()])

Returns a list of events in a given period.

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

[ Top ]

method rebuildCache [line 306]

void rebuildCache( )

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.






[ Top ]

method showEvent [line 180]

void showEvent( $event $event)

Returns the html code for an event according to permissions





Parameters:

$event   $event   an single event in the format of listEvent()

[ Top ]

method sort_ev [line 390]

void sort_ev( mixed $ev1, mixed $ev2)

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.





[ Top ]


Documentation generated on Tue, 29 Mar 2005 09:03:40 -0800 by phpDocumentor 1.2.0rc2