ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCalendarRecurrenceGUI Class Reference

GUI class for calendar recurrences. More...

+ Collaboration diagram for ilCalendarRecurrenceGUI:

Public Member Functions

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

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

ilCalendarRecurrenceGUI::__construct (   $a_form,
  $a_recurrence 
)

Constructor.

public

Parameters

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

References $lng, and $tpl.

{
global $tpl,$lng;
$this->form = $a_form;
$this->recurrence = $a_recurrence;
$this->lng = $lng;
$this->lng->loadLanguageModule('dateplaner');
}

Member Function Documentation

ilCalendarRecurrenceGUI::initForm ( )

get html

public

Parameters
@return

Definition at line 77 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().

{
$rec = new ilSelectInputGUI($this->lng->txt('cal_recurrences'),'frequence');
$rec->setRequired(true);
$rec->setOptions(
array(0 => $this->lng->txt('cal_no_recurrence'),
ilCalendarRecurrence::FREQ_DAILY => $this->lng->txt('cal_rec_daily'),
ilCalendarRecurrence::FREQ_WEEKLY => $this->lng->txt('cal_rec_weekly'),
ilCalendarRecurrence::FREQ_MONTHLY => $this->lng->txt('cal_rec_monthly'),
ilCalendarRecurrence::FREQ_YEARLY => $this->lng->txt('cal_rec_yearly')));
$rec->setValue($this->recurrence->getFrequenceType());
$this->form->addItem($rec);
// DAILY part
$interval = new ilTextInputGUI($this->lng->txt('interval'),'interval');
$interval->setSize(2);
$interval->setMaxLength(3);
$interval->setValue($this->recurrence->getInterval() ? $this->recurrence->getInterval() : 1);
$interval->setInfo($this->lng->txt('interval_info'));
$rec->addSubItem($interval);
// Weekly
$check = new ilCheckboxInputGUI($this->lng->txt('Su_short'),'w_day[0]');
$check->setChecked(true);
$rec->addSubItem($check);
$check = new ilCheckboxInputGUI($this->lng->txt('Mo_short'),'w_day[1]');
$check->setChecked(true);
$rec->addSubItem($check);
$check = new ilCheckboxInputGUI($this->lng->txt('Tu_short'),'w_day[2]');
$check->setChecked(true);
$rec->addSubItem($check);
$check = new ilCheckboxInputGUI($this->lng->txt('We_short'),'w_day[3]');
$check->setChecked(true);
$rec->addSubItem($check);
$check = new ilCheckboxInputGUI($this->lng->txt('Th_short'),'w_day[4]');
$check->setChecked(true);
$rec->addSubItem($check);
$check = new ilCheckboxInputGUI($this->lng->txt('Fr_short'),'w_day[5]');
$check->setChecked(true);
$rec->addSubItem($check);
$check = new ilCheckboxInputGUI($this->lng->txt('Sa_short'),'w_day[6]');
$check->setChecked(true);
$rec->addSubItem($check);
}

+ Here is the call graph for this function:

ilCalendarRecurrenceGUI::setRecurrence (   $a_rec)

set recurrence object

public

Parameters
recurrence
Returns

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

{
$this->recurrence = $a_rec;
}

Field Documentation

ilCalendarRecurrenceGUI::$appointment
protected

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

ilCalendarRecurrenceGUI::$form
protected

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

ilCalendarRecurrenceGUI::$recurrence
protected

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


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