Stud.IP  2.4 Revision 48548
 All Data Structures Namespaces Files Functions Variables Groups Pages
CalendarWeekView Class Reference
Inheritance diagram for CalendarWeekView:
Inheritance graph
Collaboration diagram for CalendarWeekView:
Collaboration graph

Public Member Functions

 __construct ($entries, $controller)
 groupEntries ($grouped=true)
 setReadOnly ($readonly=true)
 getContext ()
 getDays ()
 getInsertFunction ()
 getColumns ()
- Public Member Functions inherited from CalendarView
 __construct ($entries=array())
 setHeight ($height)
 setRange ($start_hour, $end_hour)
 addColumn ($title, $url="", $id=null)
 addEntry ($entry_array)
 setInsertFunction ($js_function_object)
 render ($params=array())
 getEntries ()
 getMatrix ()
 getRange ()
 isGrouped ()
 getHeight ()
 getOverallHeight ()

Protected Attributes

 $read_only = false
 $days = array(1,2,3,4,5)
- Protected Attributes inherited from CalendarView
 $entries = array()
 $entry_columns = array()
 $height = 40
 $grouped = false
 $start_hour = 8
 $end_hour = 21
 $insertFunction = ""
 $templates = array()
 $view_id

Static Protected Attributes

static $day_names = array("Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag")
- Static Protected Attributes inherited from CalendarView
static $number_of_instances = 1

Additional Inherited Members

- Protected Member Functions inherited from CalendarView
 checkEntries ($entries)

Detailed Description

Kind of bean class for the calendar view.

Since
2.0

Constructor & Destructor Documentation

__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( $day_number => array(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 ) ...) ... )

Parameters
mixed$entriesan array of entries (see above)
string$controllerthe name of the controller. Used to create links.

Member Function Documentation

getColumns ( )

returns all columns of the calendar-view nad removes the url if read_only is set

Returns
array of CalendarColumn

Reimplemented from CalendarView.

getContext ( )
Returns
mixed the context
getDays ( )
Returns
mixed the days
getInsertFunction ( )

returns the previously set javasscript insert-function only if read_only is not set.

Returns
string name of js-function or anonymous js-function

Reimplemented from CalendarView.

groupEntries (   $grouped = true)

Call this function th enable/disable the grouping of entries with the same start and end.

Parameters
bool$groupoptional, defaults to true

Reimplemented from CalendarView.

setReadOnly (   $readonly = true)
Parameters
bool$readonlytrue to make it read only, false otherwise
Returns
void

Field Documentation

$day_names = array("Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag")
staticprotected
$days = array(1,2,3,4,5)
protected
$read_only = false
protected

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