ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
ilCalendarRecurrenceGUI Class Reference

GUI class for calendar recurrences. More...

+ Collaboration diagram for ilCalendarRecurrenceGUI:

Public Member Functions

 __construct ($a_form, $a_recurrence)
 Constructor. More...
 
 setRecurrence ($a_rec)
 set recurrence object More...
 
 initForm ()
 get html More...
 

Protected Attributes

 $form
 
 $appointment
 
 $recurrence
 

Detailed Description

GUI class for calendar recurrences.

Used for calendar appointments and course events

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 34 of file class.ilCalendarRecurrenceGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilCalendarRecurrenceGUI::__construct (   $a_form,
  $a_recurrence 
)

Constructor.

public

Parameters

Definition at line 46 of file class.ilCalendarRecurrenceGUI.php.

References $lng, and $tpl.

47  {
48  global $tpl,$lng;
49 
50  $this->form = $a_form;
51  $this->recurrence = $a_recurrence;
52 
53  $this->lng = $lng;
54  $this->lng->loadLanguageModule('dateplaner');
55 
56  }
global $tpl
Definition: ilias.php:8
global $lng
Definition: privfeed.php:17

Member Function Documentation

◆ initForm()

ilCalendarRecurrenceGUI::initForm ( )

get html

public

Parameters

Definition at line 77 of file class.ilCalendarRecurrenceGUI.php.

References array, ilCalendarRecurrence\FREQ_DAILY, ilCalendarRecurrence\FREQ_MONTHLY, ilCalendarRecurrence\FREQ_WEEKLY, ilCalendarRecurrence\FREQ_YEARLY, ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setRequired(), and ilTextInputGUI\setSize().

78  {
79  $rec = new ilSelectInputGUI($this->lng->txt('cal_recurrences'),'frequence');
80  $rec->setRequired(true);
81  $rec->setOptions(
82  array(0 => $this->lng->txt('cal_no_recurrence'),
83  ilCalendarRecurrence::FREQ_DAILY => $this->lng->txt('cal_rec_daily'),
84  ilCalendarRecurrence::FREQ_WEEKLY => $this->lng->txt('cal_rec_weekly'),
85  ilCalendarRecurrence::FREQ_MONTHLY => $this->lng->txt('cal_rec_monthly'),
86  ilCalendarRecurrence::FREQ_YEARLY => $this->lng->txt('cal_rec_yearly')));
87  $rec->setValue($this->recurrence->getFrequenceType());
88  $this->form->addItem($rec);
89 
90  // DAILY part
91  $interval = new ilTextInputGUI($this->lng->txt('interval'),'interval');
92  $interval->setSize(2);
93  $interval->setMaxLength(3);
94  $interval->setValue($this->recurrence->getInterval() ? $this->recurrence->getInterval() : 1);
95  $interval->setInfo($this->lng->txt('interval_info'));
96  $rec->addSubItem($interval);
97 
98  // Weekly
99  $check = new ilCheckboxInputGUI($this->lng->txt('Su_short'),'w_day[0]');
100  $check->setChecked(true);
101  $rec->addSubItem($check);
102  $check = new ilCheckboxInputGUI($this->lng->txt('Mo_short'),'w_day[1]');
103  $check->setChecked(true);
104  $rec->addSubItem($check);
105  $check = new ilCheckboxInputGUI($this->lng->txt('Tu_short'),'w_day[2]');
106  $check->setChecked(true);
107  $rec->addSubItem($check);
108  $check = new ilCheckboxInputGUI($this->lng->txt('We_short'),'w_day[3]');
109  $check->setChecked(true);
110  $rec->addSubItem($check);
111  $check = new ilCheckboxInputGUI($this->lng->txt('Th_short'),'w_day[4]');
112  $check->setChecked(true);
113  $rec->addSubItem($check);
114  $check = new ilCheckboxInputGUI($this->lng->txt('Fr_short'),'w_day[5]');
115  $check->setChecked(true);
116  $rec->addSubItem($check);
117  $check = new ilCheckboxInputGUI($this->lng->txt('Sa_short'),'w_day[6]');
118  $check->setChecked(true);
119  $rec->addSubItem($check);
120  }
This class represents a selection list property in a property form.
This class represents a checkbox property in a property form.
setChecked($a_checked)
Set Checked.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
Create styles array
The data for the language used.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:

◆ setRecurrence()

ilCalendarRecurrenceGUI::setRecurrence (   $a_rec)

set recurrence object

public

Parameters
recurrence
Returns

Definition at line 65 of file class.ilCalendarRecurrenceGUI.php.

66  {
67  $this->recurrence = $a_rec;
68  }

Field Documentation

◆ $appointment

ilCalendarRecurrenceGUI::$appointment
protected

Definition at line 37 of file class.ilCalendarRecurrenceGUI.php.

◆ $form

ilCalendarRecurrenceGUI::$form
protected

Definition at line 36 of file class.ilCalendarRecurrenceGUI.php.

◆ $recurrence

ilCalendarRecurrenceGUI::$recurrence
protected

Definition at line 38 of file class.ilCalendarRecurrenceGUI.php.


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