Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
CalendarWeekView Class Reference
Inheritance diagram for CalendarWeekView:
CalendarView CalendarWidgetView

Public Member Functions

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

Protected Attributes

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

Additional Inherited Members

- Data Fields inherited from CalendarView
 $sorted_entries = []
 
- Protected Member Functions inherited from CalendarView
 checkEntries ($entries)
 
- Static Protected Attributes inherited from CalendarView
static $number_of_instances = 1
 

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
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
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

Field Documentation

$context
protected
$days = [1,2,3,4,5]
protected

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