|
Stud.IP
2.0 Revision 48548
|

Public Member Functions | |
| __construct ($entries, $controller) | |
| setDays ($days) | |
| setHeight ($height) | |
| setRange ($start_hour, $end_hour) | |
| groupEntries ($grouped=true) | |
| getEntries () | |
| getMatrix () | |
| getContext () | |
| getDays () | |
| getRange () | |
| isGrouped () | |
| getHeight () | |
| getOverallHeight () | |
| setReadOnly ($readonly=true) | |
| isReadOnly () | |
Kind of bean class for the calendar view.
| __construct | ( | $entries, | |
| $controller | |||
| ) |
You need to pass an instance of this class to the template. The constructor expects an array of entries of the following type:
array ( 'color' => the color in hex (css-like, without the #) 'start' => the (start hour * 100) + (start minute) 'end' => the (end hour * 100) + (end minute) 'day' => day of week (0 = Sunday, ... , 6 = Saturday) 'title' => the entry`s title 'content' => whatever shall be the content of the entry as a string )
| mixed | $entries | an array of entries (see above) |
| string | $controller | the name of the controller. Used to create links. |
| getContext | ( | ) |
| getDays | ( | ) |
| getEntries | ( | ) |
Returns an array of calendar-entries, grouped by day and additionally grouped by same start and end if groupEntries(true) has been called.


| getHeight | ( | ) |
| getMatrix | ( | ) |
Returns an array where for each hour the number of concurrent entries is denoted. Used by the calendar to display the entries in parallel.

| getOverallHeight | ( | ) |
| getRange | ( | ) |
| groupEntries | ( | $grouped = true | ) |
Call this function th enable/disable the grouping of entries with the same start and end.
| bool | $group | optional, defaults to true |
| isGrouped | ( | ) |

| isReadOnly | ( | ) |
| setDays | ( | $days | ) |
set the visible days for the calendar. Pass an array with at least one of the numbers 0-6, which represent the numerical phplike-days respectively.
| mixed | $days | an array of at least one of the numbers 0-6 |
| setHeight | ( | $height | ) |
set the height for one hour. This value is used to calculate the whole height of the schedule.
| int | $entry_height | the height of one hour in the schedule |
| setRange | ( | $start_hour, | |
| $end_hour | |||
| ) |
set the range of hours to be displayed. the start_hour has to be smaller than the end_hour
| int | $start_hour | the hour to start displaying at |
| int | $end_hour | the hour to stop displaying at |
| setReadOnly | ( | $readonly = true | ) |
| bool | true to make it read only, false otherwise |