ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 $DIC, $lng, and $tpl.

47  {
48  global $DIC;
49 
50  $tpl = $DIC['tpl'];
51  $lng = $DIC['lng'];
52 
53  $this->form = $a_form;
54  $this->recurrence = $a_recurrence;
55 
56  $this->lng = $lng;
57  $this->lng->loadLanguageModule('dateplaner');
58  }
global $DIC
Definition: saml.php:7
$tpl
Definition: ilias.php:10
$lng

Member Function Documentation

◆ initForm()

ilCalendarRecurrenceGUI::initForm ( )

get html

public

Parameters

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

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

80  {
81  $rec = new ilSelectInputGUI($this->lng->txt('cal_recurrences'), 'frequence');
82  $rec->setRequired(true);
83  $rec->setOptions(
84  array(0 => $this->lng->txt('cal_no_recurrence'),
85  ilCalendarRecurrence::FREQ_DAILY => $this->lng->txt('cal_rec_daily'),
86  ilCalendarRecurrence::FREQ_WEEKLY => $this->lng->txt('cal_rec_weekly'),
87  ilCalendarRecurrence::FREQ_MONTHLY => $this->lng->txt('cal_rec_monthly'),
88  ilCalendarRecurrence::FREQ_YEARLY => $this->lng->txt('cal_rec_yearly'))
89  );
90  $rec->setValue($this->recurrence->getFrequenceType());
91  $this->form->addItem($rec);
92 
93  // DAILY part
94  $interval = new ilTextInputGUI($this->lng->txt('interval'), 'interval');
95  $interval->setSize(2);
96  $interval->setMaxLength(3);
97  $interval->setValue($this->recurrence->getInterval() ? $this->recurrence->getInterval() : 1);
98  $interval->setInfo($this->lng->txt('interval_info'));
99  $rec->addSubItem($interval);
100 
101  // Weekly
102  $check = new ilCheckboxInputGUI($this->lng->txt('Su_short'), 'w_day[0]');
103  $check->setChecked(true);
104  $rec->addSubItem($check);
105  $check = new ilCheckboxInputGUI($this->lng->txt('Mo_short'), 'w_day[1]');
106  $check->setChecked(true);
107  $rec->addSubItem($check);
108  $check = new ilCheckboxInputGUI($this->lng->txt('Tu_short'), 'w_day[2]');
109  $check->setChecked(true);
110  $rec->addSubItem($check);
111  $check = new ilCheckboxInputGUI($this->lng->txt('We_short'), 'w_day[3]');
112  $check->setChecked(true);
113  $rec->addSubItem($check);
114  $check = new ilCheckboxInputGUI($this->lng->txt('Th_short'), 'w_day[4]');
115  $check->setChecked(true);
116  $rec->addSubItem($check);
117  $check = new ilCheckboxInputGUI($this->lng->txt('Fr_short'), 'w_day[5]');
118  $check->setChecked(true);
119  $rec->addSubItem($check);
120  $check = new ilCheckboxInputGUI($this->lng->txt('Sa_short'), 'w_day[6]');
121  $check->setChecked(true);
122  $rec->addSubItem($check);
123  }
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.
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 67 of file class.ilCalendarRecurrenceGUI.php.

68  {
69  $this->recurrence = $a_rec;
70  }

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: