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

This class represents an input GUI for recurring events/appointments (course events or calendar appointments) More...

+ Inheritance diagram for ilRecurrenceInputGUI:
+ Collaboration diagram for ilRecurrenceInputGUI:

Public Member Functions

 __construct ($a_title, $a_postvar)
 Constructor.
 checkInput ()
 check input
 setRecurrence ($a_rec)
 set recurrence object
 getRecurrence ()
 Get Recurrence.
 allowUnlimitedRecurrences ($a_status)
 Allow unlimited recurrences.
 isUnlimitedRecurrenceAllowed ()
 Check if unlimited recurrence is allowed.
 setEnabledSubForms ($a_sub_forms)
 set enabled subforms
 getEnabledSubForms ()
 get enabled subforms
 insert ($a_tpl)
 insert
- Public Member Functions inherited from ilCustomInputGUI
 setHtml ($a_html)
 Set Html.
 getHtml ()
 Get Html.
 setValueByArray ($a_values)
 Set value by array.
 insert (&$a_tpl)
 Insert property html.
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem.
 getSubItems ()
 Get Subitems.
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively
 checkSubItemsInput ()
 Check SubItems.
 getSubForm ()
 Get sub form html.
 getItemByPostVar ($a_post_var)
 Get item by post var.
- Public Member Functions inherited from ilFormPropertyGUI
executeCommand ()
 Execute command.
 getType ()
 Get Type.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setPostVar ($a_postvar)
 Set Post Variable.
 getPostVar ()
 Get Post Variable.
 getFieldId ()
 Get Post Variable.
 setInfo ($a_info)
 Set Information Text.
 getInfo ()
 Get Information Text.
 setAlert ($a_alert)
 Set Alert Text.
 getAlert ()
 Get Alert Text.
 setRequired ($a_required)
 Set Required.
 getRequired ()
 Get Required.
 setDisabled ($a_disabled)
 Set Disabled.
 getDisabled ()
 Get Disabled.
 setParentForm ($a_parentform)
 Set Parent Form.
 getParentForm ()
 Get Parent Form.
 setParent ($a_val)
 Set Parent GUI object.
 getParent ()
 Get Parent GUI object.
 hideSubForm ()
 Sub form hidden on init?
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders)
 getHiddenTitle ()
 Get hidden title.
 serializeData ()
 serialize data
 unserializeData ($a_data)
 unserialize data
 writeToSession ()
 Write to session.
 clearFromSession ()
 Clear session value.
 readFromSession ()
 Read from session.
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties)
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi.
 getMulti ()
 Get Multi.
 setMultiValues (array $a_values)
 Set multi values.
 getMultiValues ()
 Get multi values.
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g.

Data Fields

const REC_LIMITED = 2
const REC_UNLIMITED = 1

Protected Member Functions

 loadRecurrence ()
 load recurrence settings protected
 buildWeekDaySelection ($tpl)
 build weekday checkboxes
 buildMonthlyByDaySelection ($tpl)
 build monthly by day list (e.g second monday)
 buildMonthlyByMonthDaySelection ($tpl)
 build monthly bymonthday selection
 buildYearlyByMonthDaySelection ($tpl)
 protected
 buildYearlyByDaySelection ($tpl)
 protected
 buildUntilSelection ($tpl)
 build selection for ending date

Protected Attributes

 $lng
 $recurrence
 $user_settings
 $allow_unlimited_recurrences = true
 $enabled_subforms
- Protected Attributes inherited from ilCustomInputGUI
 $html
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false
 $parentgui
 $parentform
 $hidden_title = ""
 $multi = false
 $multi_sortable = false
 $multi_addremove = true
 $multi_values

Detailed Description

This class represents an input GUI for recurring events/appointments (course events or calendar appointments)

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

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

Constructor & Destructor Documentation

ilRecurrenceInputGUI::__construct (   $a_title,
  $a_postvar 
)

Constructor.

public

Parameters
stringtitle
stringpostvar

Reimplemented from ilCustomInputGUI.

Definition at line 62 of file class.ilRecurrenceInputGUI.php.

References $ilUser, $lng, $tpl, ilCalendarUserSettings\_getInstanceByUserId(), and setRecurrence().

{
global $lng,$tpl,$ilUser;
$this->lng = $lng;
$this->lng->loadLanguageModule('dateplaner');
$this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($ilUser->getId());
$tpl->addJavascript("./Services/Calendar/js/recurrence_input.js");
parent::__construct($a_title,$a_postvar);
}

+ Here is the call graph for this function:

Member Function Documentation

ilRecurrenceInputGUI::allowUnlimitedRecurrences (   $a_status)

Allow unlimited recurrences.

Parameters
object$a_status
Returns

Definition at line 247 of file class.ilRecurrenceInputGUI.php.

Referenced by ilObjSessionGUI\initForm().

{
$this->allow_unlimited_recurrences = $a_status;
}

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::buildMonthlyByDaySelection (   $tpl)
protected

build monthly by day list (e.g second monday)

protected

Parameters
@return

Definition at line 413 of file class.ilRecurrenceInputGUI.php.

References $tpl, ilCalendarUtil\_numericDayToString(), and ilUtil\formSelect().

Referenced by insert().

{
$byday_list = $this->recurrence->getBYDAYList();
$chosen_num_day = 1;
$chosen_day = 'MO';
$chosen = false;
foreach($byday_list as $byday)
{
if(preg_match('/^(-?\d)([A-Z][A-Z])/',$byday,$parsed) === 1)
{
$chosen = true;
$chosen_num_day = $parsed[1];
$chosen_day = $parsed[2];
}
}
// check for last day
if(count($this->recurrence->getBYMONTHDAYList()) == 1)
{
$bymonthday = $this->recurrence->getBYMONTHDAY();
if(in_array($bymonthday,array(1,2,3,4,5,-1)))
{
$chosen = true;
$chosen_num_day = $bymonthday;
$chosen_day = 9;
}
}
// Check for first, second... last weekday
if(count($this->recurrence->getBYSETPOSList()) == 1)
{
$bysetpos = $this->recurrence->getBYSETPOS();
if(in_array($bysetpos,array(1,2,3,4,5,-1)))
{
if($this->recurrence->getBYDAYList() == array('MO','TU','WE','TH','FR'))
{
$chosen = true;
$chosen_num_day = $bysetpos;
$chosen_day = 8;
}
}
}
if($chosen)
{
$tpl->setVariable('M_BYDAY_CHECKED','checked="checked"');
}
$num_options = array(
1 => $this->lng->txt('cal_first'),
2 => $this->lng->txt('cal_second'),
3 => $this->lng->txt('cal_third'),
4 => $this->lng->txt('cal_fourth'),
5 => $this->lng->txt('cal_fifth'),
-1 => $this->lng->txt('cal_last'));
$tpl->setVariable('SELECT_BYDAY_NUM_MONTHLY',ilUtil::formSelect(
$chosen_num_day,
'monthly_byday_num',
$num_options,
false,
true,
'',
'',
array('onchange' => "ilUpdateSubTypeSelection('sub_monthly_radio_1');")));
$days = array(0 => 'SU',1 => 'MO',2 => 'TU',3 => 'WE',4 => 'TH',5 => 'FR',6 => 'SA',7 => 'SU');
for($i = (int) $this->user_settings->getWeekStart();$i < 7 + (int) $this->user_settings->getWeekStart();$i++)
{
$days_select[$days[$i]] = ilCalendarUtil::_numericDayToString($i);
}
$days_select[8] = $this->lng->txt('cal_weekday');
$days_select[9] = $this->lng->txt('cal_day_of_month');
$tpl->setVariable('SEL_BYDAY_DAY_MONTHLY',ilUtil::formSelect(
$chosen_day,
'monthly_byday_day',
$days_select,
false,
true,
'',
'',
array('onchange' => "ilUpdateSubTypeSelection('sub_monthly_radio_1');")));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::buildMonthlyByMonthDaySelection (   $tpl)
protected

build monthly bymonthday selection

protected

Parameters
@return

Definition at line 505 of file class.ilRecurrenceInputGUI.php.

References $options, $tpl, and ilUtil\formSelect().

Referenced by insert().

{
$tpl->setVariable('TXT_IN',$this->lng->txt('cal_in'));
$chosen_day = 1;
$chosen = false;
if(count($bymonthday = $this->recurrence->getBYMONTHDAYList()) == 1)
{
foreach($bymonthday as $mday)
{
if($mday > 0 and $mday < 32)
{
$chosen = true;
$chosen_day = $mday;
}
}
}
if($chosen)
{
$tpl->setVariable('M_BYMONTHDAY_CHECKED','checked="checked"');
}
for($i = 1; $i < 32;$i++)
{
$options[$i] = $i;
}
$tpl->setVariable('SELECT_BYMONTHDAY',ilUtil::formSelect(
$chosen_day,
'monthly_bymonthday',
false,
true,
'',
'',
array('onchange' => "ilUpdateSubTypeSelection('sub_monthly_radio_2');")));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::buildUntilSelection (   $tpl)
protected

build selection for ending date

protected

Parameters
objecttpl
Returns

Definition at line 705 of file class.ilRecurrenceInputGUI.php.

References $tpl, IL_CAL_UNIX, and isUnlimitedRecurrenceAllowed().

Referenced by insert().

{
{
$tpl->setVariable('TXT_NO_ENDING',$this->lng->txt('cal_no_ending'));
}
$tpl->setVariable('TXT_UNTIL_CREATE',$this->lng->txt('cal_create'));
$tpl->setVariable('TXT_APPOINTMENTS',$this->lng->txt('cal_appointments'));
$tpl->setVariable('VAL_COUNT',$this->recurrence->getFrequenceUntilCount() ?
$this->recurrence->getFrequenceUntilCount() :
2);
if($this->recurrence->getFrequenceUntilDate())
{
$tpl->setVariable('UNTIL_END_CHECKED','checked="checked"');
}
elseif($this->recurrence->getFrequenceUntilCount() or !$this->isUnlimitedRecurrenceAllowed())
{
$tpl->setVariable('UNTIL_COUNT_CHECKED','checked="checked"');
}
else
{
$tpl->setVariable('UNTIL_NO_CHECKED','checked="checked"');
}
$tpl->setVariable('TXT_UNTIL_END',$this->lng->txt('cal_repeat_until'));
$dt = new ilDateTimeInputGUI('','until_end');
$dt->setDate(
$this->recurrence->getFrequenceUntilDate() ? $this->recurrence->getFrequenceUntilDate() : new ilDate(time(),IL_CAL_UNIX));
$tpl->setVariable('UNTIL_END_DATE',$dt->getTableFilterHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::buildWeekDaySelection (   $tpl)
protected

build weekday checkboxes

protected

Parameters
objecttpl

Definition at line 377 of file class.ilRecurrenceInputGUI.php.

References $tpl, and ilCalendarUtil\_numericDayToString().

Referenced by insert().

{
$days = array(0 => 'SU',1 => 'MO',2 => 'TU',3 => 'WE',4 => 'TH',5 => 'FR',6 => 'SA',7 => 'SU');
$checked_days = array();
foreach($this->recurrence->getBYDAYList() as $byday)
{
if(in_array($byday,$days))
{
$checked_days[] = $byday;
}
}
for($i = (int) $this->user_settings->getWeekStart();$i < 7 + (int) $this->user_settings->getWeekStart();$i++)
{
$tpl->setCurrentBlock('byday_simple');
if(in_array($days[$i],$checked_days))
{
$tpl->setVariable('BYDAY_WEEKLY_CHECKED','checked="checked"');
}
$tpl->setVariable('TXT_ON',$this->lng->txt('cal_on'));
$tpl->setVariable('BYDAY_WEEKLY_VAL',$days[$i]);
$tpl->setVariable('TXT_DAY_SHORT',ilCalendarUtil::_numericDayToString($i,false));
$tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::buildYearlyByDaySelection (   $tpl)
protected

protected

Parameters
@return

Definition at line 617 of file class.ilRecurrenceInputGUI.php.

References $options, $tpl, ilCalendarUtil\_numericDayToString(), ilCalendarUtil\_numericMonthToString(), and ilUtil\formSelect().

Referenced by insert().

{
$tpl->setVariable('TXT_ON_THE',$this->lng->txt('cal_on_the'));
$chosen_num_day = 1;
$chosen_day = 'MO';
$chosen = false;
foreach($this->recurrence->getBYDAYList() as $byday)
{
if(preg_match('/^(-?\d)([A-Z][A-Z])/',$byday,$parsed) === 1)
{
$chosen = true;
$chosen_num_day = $parsed[1];
$chosen_day = $parsed[2];
}
}
$num_options = array(
1 => $this->lng->txt('cal_first'),
2 => $this->lng->txt('cal_second'),
3 => $this->lng->txt('cal_third'),
4 => $this->lng->txt('cal_fourth'),
5 => $this->lng->txt('cal_fifth'),
-1 => $this->lng->txt('cal_last'));
$tpl->setVariable('SELECT_BYDAY_NUM_YEARLY',ilUtil::formSelect(
$chosen_num_day,
'yearly_byday_num',
$num_options,
false,
true,
'',
'',
array('onchange' => "ilUpdateSubTypeSelection('sub_yearly_radio_1');")));
$days = array(0 => 'SU',1 => 'MO',2 => 'TU',3 => 'WE',4 => 'TH',5 => 'FR',6 => 'SA',7 => 'SU');
for($i = (int) $this->user_settings->getWeekStart();$i < 7 + (int) $this->user_settings->getWeekStart();$i++)
{
$days_select[$days[$i]] = ilCalendarUtil::_numericDayToString($i);
}
$tpl->setVariable('SELECT_BYDAY_DAY_YEARLY',ilUtil::formSelect(
$chosen_day,
'yearly_byday',
$days_select,
false,
true,
'',
'',
array('onchange' => "ilUpdateSubTypeSelection('sub_yearly_radio_1');")));
$chosen = false;
$chosen_month = 1;
foreach($this->recurrence->getBYMONTHList() as $month)
{
if($this->recurrence->getBYMONTHDAYList())
{
$chosen_month = $month;
$chosen = true;
break;
}
}
$options = array();
for($m = 1;$m < 13;$m++)
{
}
$tpl->setVariable('SELECT_BYMONTH_BYDAY',ilUtil::formSelect(
$chosen_month,
'yearly_bymonth_byday',
false,
true,
'',
'',
array('onchange' => "ilUpdateSubTypeSelection('sub_yearly_radio_1');")));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::buildYearlyByMonthDaySelection (   $tpl)
protected

protected

Parameters
objettpl
Returns

Definition at line 550 of file class.ilRecurrenceInputGUI.php.

References $options, $tpl, ilCalendarUtil\_numericMonthToString(), and ilUtil\formSelect().

Referenced by insert().

{
$tpl->setVariable('TXT_Y_EVERY',$this->lng->txt('cal_every'));
$chosen = false;
$chosen_month = 1;
$chosen_day = 1;
foreach($this->recurrence->getBYMONTHList() as $month)
{
if($this->recurrence->getBYMONTHDAYList())
{
$chosen_month = $month;
$chosen = true;
break;
}
}
foreach($this->recurrence->getBYMONTHDAYList() as $day)
{
$chosen_day = $day;
}
for($i = 1; $i < 32;$i++)
{
$options[$i] = $i;
}
$tpl->setVariable('SELECT_BYMONTHDAY_NUM_YEARLY',ilUtil::formSelect(
$chosen_day,
'yearly_bymonthday',
false,
true,
'',
'',
array('onchange' => "ilUpdateSubTypeSelection('sub_yearly_radio_2');")));
$options = array();
for($m = 1;$m < 13;$m++)
{
}
$tpl->setVariable('SELECT_BYMONTH_YEARLY',ilUtil::formSelect(
$chosen_month,
'yearly_bymonth_by_monthday',
false,
true,
'',
'',
array('onchange' => "ilUpdateSubTypeSelection('sub_yearly_radio_2');")));
if($chosen)
{
$tpl->setVariable('Y_BYMONTHDAY_CHECKED','checked="checked"');
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::checkInput ( )

check input

public

Parameters
@return

Reimplemented from ilCustomInputGUI.

Definition at line 84 of file class.ilRecurrenceInputGUI.php.

References $_POST, $lng, loadRecurrence(), REC_LIMITED, and ilFormPropertyGUI\setAlert().

{
global $lng;
$this->loadRecurrence();
if($_POST['frequence'] == 'NONE')
{
return true;
}
if(!isset($_POST['until_type']) or $_POST['until_type'] == REC_LIMITED)
{
if($_POST['count'] <= 0 or $_POST['count'] >= 100)
{
$this->setAlert($lng->txt("cal_rec_err_limit"));
return false;
}
}
return true;
}

+ Here is the call graph for this function:

ilRecurrenceInputGUI::getEnabledSubForms ( )

get enabled subforms

public

Returns

Definition at line 279 of file class.ilRecurrenceInputGUI.php.

References $enabled_subforms.

Referenced by insert().

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::getRecurrence ( )

Get Recurrence.

Returns

Definition at line 237 of file class.ilRecurrenceInputGUI.php.

References $recurrence.

Referenced by loadRecurrence().

{
}

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::insert (   $a_tpl)

insert

public

Parameters
@return

Definition at line 291 of file class.ilRecurrenceInputGUI.php.

References $options, $tpl, buildMonthlyByDaySelection(), buildMonthlyByMonthDaySelection(), buildUntilSelection(), buildWeekDaySelection(), buildYearlyByDaySelection(), buildYearlyByMonthDaySelection(), ilUtil\formSelect(), getEnabledSubForms(), IL_CAL_FREQ_DAILY, IL_CAL_FREQ_MONTHLY, IL_CAL_FREQ_WEEKLY, and IL_CAL_FREQ_YEARLY.

{
$tpl = new ilTemplate('tpl.recurrence_input.html',true,true,'Services/Calendar');
$options = array('NONE' => $this->lng->txt('cal_no_recurrence'));
if(in_array(IL_CAL_FREQ_DAILY, $this->getEnabledSubForms()))
{
$options[IL_CAL_FREQ_DAILY] = $this->lng->txt('cal_daily');
}
if(in_array(IL_CAL_FREQ_WEEKLY, $this->getEnabledSubForms()))
{
$options[IL_CAL_FREQ_WEEKLY] = $this->lng->txt('cal_weekly');
}
if(in_array(IL_CAL_FREQ_MONTHLY, $this->getEnabledSubForms()))
{
$options[IL_CAL_FREQ_MONTHLY] = $this->lng->txt('cal_monthly');
}
if(in_array(IL_CAL_FREQ_YEARLY, $this->getEnabledSubForms()))
{
$options[IL_CAL_FREQ_YEARLY] = $this->lng->txt('cal_yearly');
}
$tpl->setVariable('FREQUENCE',ilUtil::formSelect(
$this->recurrence->getFrequenceType(),
'frequence',
false,
true,
'',
'',
array('onchange' => 'ilHideFrequencies();','id' => 'il_recurrence_1')));
$tpl->setVariable('TXT_EVERY',$this->lng->txt('cal_every'));
// DAILY
if(in_array(IL_CAL_FREQ_DAILY, $this->getEnabledSubForms()))
{
$tpl->setVariable('TXT_DAILY_FREQ_UNIT',$this->lng->txt('cal_day_s'));
$tpl->setVariable('COUNT_DAILY_VAL',$this->recurrence->getInterval());
}
// WEEKLY
if(in_array(IL_CAL_FREQ_WEEKLY, $this->getEnabledSubForms()))
{
$tpl->setVariable('TXT_WEEKLY_FREQ_UNIT',$this->lng->txt('cal_week_s'));
$tpl->setVariable('COUNT_WEEKLY_VAL',$this->recurrence->getInterval());
}
// MONTHLY
if(in_array(IL_CAL_FREQ_MONTHLY, $this->getEnabledSubForms()))
{
$tpl->setVariable('TXT_MONTHLY_FREQ_UNIT',$this->lng->txt('cal_month_s'));
$tpl->setVariable('COUNT_MONTHLY_VAL',$this->recurrence->getInterval());
$tpl->setVariable('TXT_ON_THE',$this->lng->txt('cal_on_the'));
$tpl->setVariable('TXT_BYMONTHDAY',$this->lng->txt('cal_on_the'));
$tpl->setVariable('TXT_OF_THE_MONTH',$this->lng->txt('cal_of_the_month'));
}
// YEARLY
if(in_array(IL_CAL_FREQ_YEARLY, $this->getEnabledSubForms()))
{
$tpl->setVariable('TXT_YEARLY_FREQ_UNIT',$this->lng->txt('cal_year_s'));
$tpl->setVariable('COUNT_YEARLY_VAL',$this->recurrence->getInterval());
$tpl->setVariable('TXT_ON_THE',$this->lng->txt('cal_on_the'));
}
// UNTIL
$a_tpl->setCurrentBlock("prop_custom");
$a_tpl->setVariable("CUSTOM_CONTENT", $tpl->get());
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilRecurrenceInputGUI::isUnlimitedRecurrenceAllowed ( )

Check if unlimited recurrence is allowed.

Returns

Definition at line 256 of file class.ilRecurrenceInputGUI.php.

References $allow_unlimited_recurrences.

Referenced by buildUntilSelection().

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::loadRecurrence ( )
protected

load recurrence settings protected

Returns

Definition at line 113 of file class.ilRecurrenceInputGUI.php.

References $_POST, getRecurrence(), IL_CAL_FKT_GETDATE, IL_CAL_FREQ_DAILY, IL_CAL_FREQ_MONTHLY, IL_CAL_FREQ_WEEKLY, IL_CAL_FREQ_YEARLY, and ilUtil\stripSlashes().

Referenced by checkInput().

{
if(!$this->getRecurrence() instanceof ilCalendarRecurrence)
{
return false;
}
switch($_POST['frequence'])
{
$this->getRecurrence()->setFrequenceType($_POST['frequence']);
$this->getRecurrence()->setInterval((int) $_POST['count_DAILY']);
break;
$this->getRecurrence()->setFrequenceType($_POST['frequence']);
$this->getRecurrence()->setInterval((int) $_POST['count_WEEKLY']);
if(is_array($_POST['byday_WEEKLY']))
{
$this->getRecurrence()->setBYDAY(ilUtil::stripSlashes(implode(',',$_POST['byday_WEEKLY'])));
}
break;
$this->getRecurrence()->setFrequenceType($_POST['frequence']);
$this->getRecurrence()->setInterval((int) $_POST['count_MONTHLY']);
switch((int) $_POST['subtype_MONTHLY'])
{
case 0:
// nothing to do;
break;
case 1:
switch((int) $_POST['monthly_byday_day'])
{
case 8:
// Weekday
$this->getRecurrence()->setBYSETPOS((int) $_POST['monthly_byday_num']);
$this->getRecurrence()->setBYDAY('MO,TU,WE,TH,FR');
break;
case 9:
// Day of month
$this->getRecurrence()->setBYMONTHDAY((int) $_POST['monthly_byday_num']);
break;
default:
$this->getRecurrence()->setBYDAY((int) $_POST['monthly_byday_num'].$_POST['monthly_byday_day']);
break;
}
break;
case 2:
$this->getRecurrence()->setBYMONTHDAY((int) $_POST['monthly_bymonthday']);
break;
}
break;
$this->getRecurrence()->setFrequenceType($_POST['frequence']);
$this->getRecurrence()->setInterval((int) $_POST['count_YEARLY']);
switch((int) $_POST['subtype_YEARLY'])
{
case 0:
// nothing to do;
break;
case 1:
$this->getRecurrence()->setBYMONTH((int) $_POST['yearly_bymonth_byday']);
$this->getRecurrence()->setBYDAY((int) $_POST['yearly_byday_num'].$_POST['yearly_byday']);
break;
case 2:
$this->getRecurrence()->setBYMONTH((int) $_POST['yearly_bymonth_by_monthday']);
$this->getRecurrence()->setBYMONTHDAY((int) $_POST['yearly_bymonthday']);
break;
}
break;
}
// UNTIL
switch((int) $_POST['until_type'])
{
case 1:
$this->getRecurrence()->setFrequenceUntilDate(null);
// nothing to do
break;
case 2:
$this->getRecurrence()->setFrequenceUntilDate(null);
$this->getRecurrence()->setFrequenceUntilCount((int) $_POST['count']);
break;
case 3:
$end_dt['year'] = (int) $_POST['until_end']['date']['y'];
$end_dt['mon'] = (int) $_POST['until_end']['date']['m'];
$end_dt['mday'] = (int) $_POST['until_end']['date']['d'];
$this->getRecurrence()->setFrequenceUntilCount(0);
$this->getRecurrence()->setFrequenceUntilDate(new ilDate($end_dt,IL_CAL_FKT_GETDATE,$this->timezone));
break;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::setEnabledSubForms (   $a_sub_forms)

set enabled subforms

public

Parameters
array(IL_CAL_FREQ_DAILY,IL_CAL_FREQ_WEEKLY...)
Returns

Definition at line 268 of file class.ilRecurrenceInputGUI.php.

Referenced by ilConsultationHoursGUI\initFormSequence().

{
$this->enabled_subforms = $a_sub_forms;
}

+ Here is the caller graph for this function:

ilRecurrenceInputGUI::setRecurrence (   $a_rec)

set recurrence object

public

Parameters
@return

Definition at line 228 of file class.ilRecurrenceInputGUI.php.

Referenced by __construct().

{
$this->recurrence = $a_rec;
}

+ Here is the caller graph for this function:

Field Documentation

ilRecurrenceInputGUI::$allow_unlimited_recurrences = true
protected

Definition at line 47 of file class.ilRecurrenceInputGUI.php.

Referenced by isUnlimitedRecurrenceAllowed().

ilRecurrenceInputGUI::$enabled_subforms
protected
ilRecurrenceInputGUI::$lng
protected

Definition at line 42 of file class.ilRecurrenceInputGUI.php.

Referenced by __construct(), and checkInput().

ilRecurrenceInputGUI::$recurrence
protected

Definition at line 44 of file class.ilRecurrenceInputGUI.php.

Referenced by getRecurrence().

ilRecurrenceInputGUI::$user_settings
protected

Definition at line 45 of file class.ilRecurrenceInputGUI.php.

const ilRecurrenceInputGUI::REC_LIMITED = 2

Definition at line 39 of file class.ilRecurrenceInputGUI.php.

Referenced by checkInput().

const ilRecurrenceInputGUI::REC_UNLIMITED = 1

Definition at line 40 of file class.ilRecurrenceInputGUI.php.


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