ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilDateDurationInputGUI Class Reference

input GUI for a time span (start and end date) More...

+ Inheritance diagram for ilDateDurationInputGUI:
+ Collaboration diagram for ilDateDurationInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor.
 enableDateActivation ($a_title, $a_postvar, $a_checked=true)
 Enable date activation.
 enableToggleFullTime ($a_title, $a_checked)
 Enable toggling between date and time.
 enabledToggleFullTime ()
 Check if toggling between date and time enabled.
 getActivationPostVar ()
 Get activation post var.
 setStart (ilDateTime $a_date)
 Set start date E.g $dt_form->setDate(new ilDateTime(time(),IL_CAL_UTC)); or $dt_form->setDate(new ilDateTime('2008-06-12 08:00:00',IL_CAL_DATETIME));.
 setStartText ($a_txt)
 Set text, which will be shown before the start date.
 getStartText ()
 get start text
 setEndText ($a_txt)
 Set text, which will be shown before the end date.
 getEndText ()
 Get end text.
 getStart ()
 Get Date, yyyy-mm-dd.
 setEnd (ilDateTime $a_date)
 Set end date E.g $dt_form->setDate(new ilDateTime(time(),IL_CAL_UTC)); or $dt_form->setDate(new ilDateTime('2008-06-12 08:00:00',IL_CAL_DATETIME));.
 getEnd ()
 Get Date, yyyy-mm-dd.
 setShowDate ($a_showdate)
 Set Show Date Information.
 getShowDate ()
 Get Show Date Information.
 setShowEmpty ($a_empty)
 Set Show Empty Information.
 getShowEmpty ()
 Get Show Empty Information.
 setShowTime ($a_showtime)
 Set Show Time Information.
 getShowTime ()
 Get Show Time Information.
 getShowSeconds ()
 Show seconds not implemented yet.
 setStartYear ($a_year)
 Set start year.
 getStartYear ()
 Get start year.
 setMinuteStepSize ($a_step_size)
 Set minute step size E.g 5 => The selection will only show 00,05,10...
 getMinuteStepSize ()
 Get minute step size.
 setValueByArray ($a_values)
 Set value by array.
 checkInput ()
 Check input, strip slashes etc.
 render ()
 Insert property html.
 insert (&$a_tpl)
 Insert property html.
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem.
 getSubItems ()
 Get Subitems.
 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)

Protected Attributes

 $start = null
 $start_year = null
 $start_text = ''
 $end_text = ''
 $minute_step_size = 5
 $end = null
 $activation_title = ''
 Activation full day events.
 $activation_post_var = ''
 $activation_checked = true
 $toggle_fulltime = false
 Toggle datetime.
 $toggle_fulltime_txt = ''
 $toggle_fulltime_checked = false
 $show_date = true
 $show_empty = false
 $show_time = true
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false
 $parentgui
 $parentform

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.

Detailed Description

input GUI for a time span (start and end date)

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

Definition at line 12 of file class.ilDateDurationInputGUI.php.

Constructor & Destructor Documentation

ilDateDurationInputGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilFormPropertyGUI.

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

References ilFormPropertyGUI\setType().

{
parent::__construct($a_title, $a_postvar);
$this->setType("dateduration");
}

+ Here is the call graph for this function:

Member Function Documentation

ilDateDurationInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilFormPropertyGUI.

Definition at line 353 of file class.ilDateDurationInputGUI.php.

References $_POST, $lng, $ok, $timestamp, ilDateTime\get(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getPostVar(), IL_CAL_FKT_DATE, IL_CAL_FKT_GETDATE, IL_CAL_UNIX, ilFormPropertyGUI\setAlert(), setEnd(), setStart(), and ilUtil\stripSlashes().

{
global $lng,$ilUser;
if($this->getDisabled())
{
return true;
}
$ok = true;
// Start
$_POST[$this->getPostVar()]['start']["date"]["y"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["date"]["y"]);
$_POST[$this->getPostVar()]["date"]["m"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["date"]["m"]);
$_POST[$this->getPostVar()]["date"]["d"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["date"]["d"]);
$_POST[$this->getPostVar()]["time"]["h"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["time"]["h"]);
$_POST[$this->getPostVar()]["time"]["m"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["time"]["m"]);
$_POST[$this->getPostVar()]["time"]["s"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["time"]["s"]);
// verify date
$dt['year'] = (int) $_POST[$this->getPostVar()]['start']['date']['y'];
$dt['mon'] = (int) $_POST[$this->getPostVar()]['start']['date']['m'];
$dt['mday'] = (int) $_POST[$this->getPostVar()]['start']['date']['d'];
$dt['hours'] = (int) $_POST[$this->getPostVar()]['start']['time']['h'];
$dt['minutes'] = (int) $_POST[$this->getPostVar()]['start']['time']['m'];
$dt['seconds'] = (int) $_POST[$this->getPostVar()]['start']['time']['s'];
$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());
$timestamp = $date->get(IL_CAL_UNIX);
if ($_POST[$this->getPostVar()]['start']["date"]["d"] != $date->get(IL_CAL_FKT_DATE,'d',$ilUser->getTimeZone()) ||
$_POST[$this->getPostVar()]['start']["date"]["m"] != $date->get(IL_CAL_FKT_DATE,'m',$ilUser->getTimeZone()) ||
$_POST[$this->getPostVar()]['start']["date"]["y"] != $date->get(IL_CAL_FKT_DATE,'Y',$ilUser->getTimeZone()))
{
$this->setAlert($lng->txt("exc_date_not_valid"));
$ok = false;
}
$_POST[$this->getPostVar()]['start']['date'] = $date->get(IL_CAL_FKT_DATE,'Y-m-d',$ilUser->getTimeZone());
$_POST[$this->getPostVar()]['start']['time'] = $date->get(IL_CAL_FKT_DATE,'H:i:s',$ilUser->getTimeZone());
$this->setStart($date);
// End
$_POST[$this->getPostVar()]['end']["date"]["y"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["date"]["y"]);
$_POST[$this->getPostVar()]["date"]["m"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["date"]["m"]);
$_POST[$this->getPostVar()]["date"]["d"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["date"]["d"]);
$_POST[$this->getPostVar()]["time"]["h"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["time"]["h"]);
$_POST[$this->getPostVar()]["time"]["m"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["time"]["m"]);
$_POST[$this->getPostVar()]["time"]["s"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["time"]["s"]);
// verify date
$dt['year'] = (int) $_POST[$this->getPostVar()]['end']['date']['y'];
$dt['mon'] = (int) $_POST[$this->getPostVar()]['end']['date']['m'];
$dt['mday'] = (int) $_POST[$this->getPostVar()]['end']['date']['d'];
$dt['hours'] = (int) $_POST[$this->getPostVar()]['end']['time']['h'];
$dt['minutes'] = (int) $_POST[$this->getPostVar()]['end']['time']['m'];
$dt['seconds'] = (int) $_POST[$this->getPostVar()]['end']['time']['s'];
$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());
$timestamp = $date->get(IL_CAL_UNIX);
if ($_POST[$this->getPostVar()]['end']["date"]["d"] != $date->get(IL_CAL_FKT_DATE,'d',$ilUser->getTimeZone()) ||
$_POST[$this->getPostVar()]['end']["date"]["m"] != $date->get(IL_CAL_FKT_DATE,'m',$ilUser->getTimeZone()) ||
$_POST[$this->getPostVar()]['end']["date"]["y"] != $date->get(IL_CAL_FKT_DATE,'Y',$ilUser->getTimeZone()))
{
$this->setAlert($lng->txt("exc_date_not_valid"));
$ok = false;
}
$_POST[$this->getPostVar()]['end']['date'] = $date->get(IL_CAL_FKT_DATE,'Y-m-d',$ilUser->getTimeZone());
$_POST[$this->getPostVar()]['end']['time'] = $date->get(IL_CAL_FKT_DATE,'H:i:s',$ilUser->getTimeZone());
$this->setEnd($date);
return $ok;
}

+ Here is the call graph for this function:

ilDateDurationInputGUI::enableDateActivation (   $a_title,
  $a_postvar,
  $a_checked = true 
)

Enable date activation.

If chosen a checkbox will be shown that gives the possibility to en/disable the date selection.

public

Parameters
stringtext displayed after the checkbox
stringname of postvar
boolcheckbox checked

Definition at line 63 of file class.ilDateDurationInputGUI.php.

{
$this->activation_title = $a_title;
$this->activation_post_var = $a_postvar;
$this->activation_checked = $a_checked;
}
ilDateDurationInputGUI::enabledToggleFullTime ( )

Check if toggling between date and time enabled.

Returns

Definition at line 87 of file class.ilDateDurationInputGUI.php.

References $toggle_fulltime.

Referenced by render().

+ Here is the caller graph for this function:

ilDateDurationInputGUI::enableToggleFullTime (   $a_title,
  $a_checked 
)

Enable toggling between date and time.

Parameters
object$a_title
object$a_checked
Returns

Definition at line 76 of file class.ilDateDurationInputGUI.php.

{
$this->toggle_fulltime_txt = $a_title;
$this->toggle_fulltime_checked = $a_checked;
$this->toggle_fulltime = true;
}
ilDateDurationInputGUI::getActivationPostVar ( )

Get activation post var.

public

Definition at line 98 of file class.ilDateDurationInputGUI.php.

References $activation_post_var.

Referenced by render().

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getEnd ( )

Get Date, yyyy-mm-dd.

Returns
object Date, yyyy-mm-dd

Definition at line 188 of file class.ilDateDurationInputGUI.php.

References $end.

Referenced by render().

{
return $this->end;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getEndText ( )

Get end text.

Returns

Definition at line 152 of file class.ilDateDurationInputGUI.php.

References $end_text.

Referenced by render().

{
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getMinuteStepSize ( )

Get minute step size.

public

Definition at line 302 of file class.ilDateDurationInputGUI.php.

References $minute_step_size.

Referenced by render().

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getShowDate ( )

Get Show Date Information.

Returns
boolean Show Date Information

Definition at line 208 of file class.ilDateDurationInputGUI.php.

Referenced by render().

{
return $this->showdate;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getShowEmpty ( )

Get Show Empty Information.

Returns
boolean Show Empty Information

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

References $show_empty.

Referenced by render().

{
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getShowSeconds ( )

Show seconds not implemented yet.

Returns

Definition at line 258 of file class.ilDateDurationInputGUI.php.

Referenced by render().

{
return false;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getShowTime ( )

Get Show Time Information.

Returns
boolean Show Time Information

Definition at line 249 of file class.ilDateDurationInputGUI.php.

Referenced by render().

{
return $this->showtime;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getStart ( )

Get Date, yyyy-mm-dd.

Returns
object Date, yyyy-mm-dd

Definition at line 162 of file class.ilDateDurationInputGUI.php.

References $start.

Referenced by render().

{
return $this->start;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getStartText ( )

get start text

Returns

Definition at line 133 of file class.ilDateDurationInputGUI.php.

References $start_text.

Referenced by render().

{
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getStartYear ( )

Get start year.

Returns
integer Start year

Definition at line 278 of file class.ilDateDurationInputGUI.php.

{
return $this->startyear;
}
ilDateDurationInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

Definition at line 601 of file class.ilDateDurationInputGUI.php.

References render().

{
$html = $this->render();
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $html);
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilDateDurationInputGUI::render ( )

Insert property html.

Definition at line 444 of file class.ilDateDurationInputGUI.php.

References $lng, $tpl, ilCalendarUserSettings\_getInstance(), elseif(), enabledToggleFullTime(), getActivationPostVar(), ilFormPropertyGUI\getDisabled(), getEnd(), getEndText(), ilUtil\getImagePath(), getMinuteStepSize(), ilFormPropertyGUI\getPostVar(), getShowDate(), getShowEmpty(), getShowSeconds(), getShowTime(), getStart(), getStartText(), IL_CAL_FKT_GETDATE, IL_CAL_UNIX, ilCalendarUtil\initJSCalendar(), ilUtil\makeDateSelect(), ilUtil\makeTimeSelect(), setEnd(), and setStart().

Referenced by insert().

{
global $lng,$ilUser;
$tpl = new ilTemplate("tpl.prop_datetime_duration.html", true, true, "Services/Form");
// Init start
if(is_a($this->getStart(),'ilDate'))
{
$start_info = $this->getStart()->get(IL_CAL_FKT_GETDATE,'','UTC');
}
elseif(is_a($this->getStart(),'ilDateTime'))
{
$start_info = $this->getStart()->get(IL_CAL_FKT_GETDATE,'',$ilUser->getTimeZone());
}
else
{
$this->setStart(new ilDateTime(time(), IL_CAL_UNIX));
$start_info = $this->getStart()->get(IL_CAL_FKT_GETDATE,'',$ilUser->getTimeZone());
}
// Init end
if(is_a($this->getEnd(),'ilDate'))
{
$end_info = $this->getEnd()->get(IL_CAL_FKT_GETDATE,'','UTC');
}
elseif(is_a($this->getEnd(),'ilDateTime'))
{
$end_info = $this->getEnd()->get(IL_CAL_FKT_GETDATE,'',$ilUser->getTimeZone());
}
else
{
$this->setEnd(new ilDateTime(time(), IL_CAL_UNIX));
$end_info = $this->getEnd()->get(IL_CAL_FKT_GETDATE,'',$ilUser->getTimeZone());
}
$lng->loadLanguageModule("jscalendar");
require_once("./Services/Calendar/classes/class.ilCalendarUtil.php");
if(strlen($this->getActivationPostVar()))
{
$tpl->setCurrentBlock('prop_date_activation');
$tpl->setVariable('CHECK_ENABLED_DATE',$this->getActivationPostVar());
$tpl->setVariable('TXT_DATE_ENABLED',$this->activation_title);
$tpl->setVariable('CHECKED_ENABLED',$this->activation_checked ? 'checked="checked"' : '');
$tpl->setVariable('CHECKED_DISABLED',$this->getDisabled() ? 'disabled="disabled" ' : '');
$tpl->parseCurrentBlock();
}
if(strlen($this->getStartText()))
{
$tpl->setVariable('TXT_START',$this->getStartText());
}
if(strlen($this->getEndText()))
{
$tpl->setVariable('TXT_END',$this->getEndText());
}
// Toggle fullday
if($this->enabledToggleFullTime())
{
$tpl->setCurrentBlock('toggle_fullday');
$tpl->setVariable('FULLDAY_POSTVAR',$this->getPostVar());
$tpl->setVariable('FULLDAY_TOGGLE_NAME',$this->getPostVar().'[fulltime]');
$tpl->setVariable('FULLDAY_TOGGLE_CHECKED',$this->toggle_fulltime_checked ? 'checked="checked"' : '');
$tpl->setVariable('FULLDAY_TOGGLE_DISABLED',$this->getDisabled() ? 'disabled="disabled"' : '');
$tpl->setVariable('TXT_TOGGLE_FULLDAY',$this->toggle_fulltime_txt);
$tpl->parseCurrentBlock();
}
if ($this->getShowDate() or 1)
{
$tpl->setVariable('POST_VAR',$this->getPostVar());
$tpl->setVariable("IMG_START_CALENDAR", ilUtil::getImagePath("calendar.png"));
$tpl->setVariable("TXT_START_CALENDAR", $lng->txt("open_calendar"));
$tpl->setVariable("START_ID", $this->getPostVar());
$tpl->setVariable("DATE_ID_START", $this->getPostVar());
$tpl->setVariable("INPUT_FIELDS_START", $this->getPostVar()."[start][date]");
include_once './Services/Calendar/classes/class.ilCalendarUserSettings.php';
$tpl->setVariable('DATE_FIRST_DAY',ilCalendarUserSettings::_getInstance()->getWeekStart());
$tpl->setVariable("START_SELECT",
$this->getPostVar()."[start][date]",
$start_info['year'], $start_info['mon'], $start_info['mday'],
$this->start_year,
true,
array(
'disabled' => $this->getDisabled(),
'select_attributes' => array('onchange' => 'ilUpdateEndDate();')
),
$this->getShowEmpty()));
$tpl->setVariable("IMG_END_CALENDAR", ilUtil::getImagePath("calendar.png"));
$tpl->setVariable("TXT_END_CALENDAR", $lng->txt("open_calendar"));
$tpl->setVariable("END_ID", $this->getPostVar());
$tpl->setVariable("DATE_ID_END", $this->getPostVar());
$tpl->setVariable("INPUT_FIELDS_END", $this->getPostVar()."[end][date]");
$tpl->setVariable("END_SELECT",
$this->getPostVar()."[end][date]",
$end_info['year'], $end_info['mon'], $end_info['mday'],
$this->start_year,
true,
array(
'disabled' => $this->getDisabled()
),
$this->getShowEmpty()));
}
if($this->getShowTime())
{
$tpl->setCurrentBlock("show_start_time");
$tpl->setVariable("START_TIME_SELECT",
$this->getPostVar()."[start][time]",
!$this->getShowSeconds(),
$start_info['hours'], $start_info['minutes'], $start_info['seconds'],
true,
array(
'minute_steps' => $this->getMinuteStepSize(),
'disabled' => $this->getDisabled(),
'select_attributes' => array('onchange' => 'ilUpdateEndDate();')
)
));
$tpl->setVariable("TXT_START_TIME", $this->getShowSeconds()
? "(".$lng->txt("hh_mm_ss").")"
: "(".$lng->txt("hh_mm").")");
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("show_end_time");
$tpl->setVariable("END_TIME_SELECT",
ilUtil::makeTimeSelect($this->getPostVar()."[end][time]", !$this->getShowSeconds(),
$end_info['hours'], $end_info['minutes'], $end_info['seconds'],
true,array('minute_steps' => $this->getMinuteStepSize(),
'disabled' => $this->getDisabled())));
$tpl->setVariable("TXT_END_TIME", $this->getShowSeconds()
? "(".$lng->txt("hh_mm_ss").")"
: "(".$lng->txt("hh_mm").")");
$tpl->parseCurrentBlock();
}
if ($this->getShowTime() && $this->getShowDate())
{
$tpl->setVariable("DELIM", "<br />");
}
return $tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilDateDurationInputGUI::setEnd ( ilDateTime  $a_date)

Set end date E.g $dt_form->setDate(new ilDateTime(time(),IL_CAL_UTC)); or $dt_form->setDate(new ilDateTime('2008-06-12 08:00:00',IL_CAL_DATETIME));.

For fullday (no timezone conversion) events use:

            $dt_form->setDate(new ilDate('2008-08-01',IL_CAL_DATE));
Parameters
object$a_dateilDate or ilDateTime object

Definition at line 178 of file class.ilDateDurationInputGUI.php.

Referenced by checkInput(), render(), and setValueByArray().

{
$this->end = $a_date;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::setEndText (   $a_txt)

Set text, which will be shown before the end date.

Parameters
object$a_txt
Returns

Definition at line 143 of file class.ilDateDurationInputGUI.php.

{
$this->end_text = $a_txt;
}
ilDateDurationInputGUI::setMinuteStepSize (   $a_step_size)

Set minute step size E.g 5 => The selection will only show 00,05,10...

minutes

public

Parameters
intminute step_size 1,5,10,15,20...

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

{
$this->minute_step_size = $a_step_size;
}
ilDateDurationInputGUI::setShowDate (   $a_showdate)

Set Show Date Information.

Parameters
boolean$a_showdateShow Date Information

Definition at line 198 of file class.ilDateDurationInputGUI.php.

{
$this->showdate = $a_showdate;
}
ilDateDurationInputGUI::setShowEmpty (   $a_empty)

Set Show Empty Information.

Parameters
booleanShow Empty Information

Definition at line 218 of file class.ilDateDurationInputGUI.php.

{
$this->show_empty = $a_empty;
}
ilDateDurationInputGUI::setShowTime (   $a_showtime)

Set Show Time Information.

Parameters
boolean$a_showtimeShow Time Information

Definition at line 239 of file class.ilDateDurationInputGUI.php.

{
$this->showtime = $a_showtime;
}
ilDateDurationInputGUI::setStart ( ilDateTime  $a_date)

Set start date E.g $dt_form->setDate(new ilDateTime(time(),IL_CAL_UTC)); or $dt_form->setDate(new ilDateTime('2008-06-12 08:00:00',IL_CAL_DATETIME));.

For fullday (no timezone conversion) events use:

            $dt_form->setDate(new ilDate('2008-08-01',IL_CAL_DATE));
Parameters
object$a_dateilDate or ilDateTime object

Definition at line 114 of file class.ilDateDurationInputGUI.php.

Referenced by checkInput(), render(), and setValueByArray().

{
$this->start = $a_date;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::setStartText (   $a_txt)

Set text, which will be shown before the start date.

Parameters
object$a_txt
Returns

Definition at line 124 of file class.ilDateDurationInputGUI.php.

Referenced by ilCalendarAppointmentGUI\initForm(), ilObjSessionGUI\initForm(), and ilObjGroupGUI\initForm().

{
$this->start_text = $a_txt;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::setStartYear (   $a_year)

Set start year.

Parameters
integerStart year

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

{
$this->startyear = $a_year;
}
ilDateDurationInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 312 of file class.ilDateDurationInputGUI.php.

References ilFormPropertyGUI\getPostVar(), ilSubEnabledFormPropertyGUI\getSubItems(), IL_CAL_DATE, IL_CAL_DATETIME, setEnd(), and setStart().

{
global $ilUser;
if(isset($a_values[$this->getPostVar()]['start']["time"]))
{
$this->setStart(new ilDateTime($a_values[$this->getPostVar()]['start']["date"].' '.$a_values[$this->getPostVar()]['start']["time"],
IL_CAL_DATETIME,$ilUser->getTimeZone()));
}
else
{
if (isset($a_values[$this->getPostVar()]['start']["date"]))
{
$this->setStart(new ilDate($a_values[$this->getPostVar()]['start']["date"],
}
}
if(isset($a_values[$this->getPostVar()]['end']["time"]))
{
$this->setEnd(new ilDateTime($a_values[$this->getPostVar()]['end']["date"].' '.$a_values[$this->getPostVar()]['end']["time"],
IL_CAL_DATETIME,$ilUser->getTimeZone()));
}
else
{
if (isset($a_values[$this->getPostVar()]['end']["date"]))
{
$this->setEnd(new ilDate($a_values[$this->getPostVar()]['end']["date"],
}
}
foreach($this->getSubItems() as $item)
{
$item->setValueByArray($a_values);
}
}

+ Here is the call graph for this function:

Field Documentation

ilDateDurationInputGUI::$activation_checked = true
protected

Definition at line 28 of file class.ilDateDurationInputGUI.php.

ilDateDurationInputGUI::$activation_post_var = ''
protected

Definition at line 27 of file class.ilDateDurationInputGUI.php.

Referenced by getActivationPostVar().

ilDateDurationInputGUI::$activation_title = ''
protected

Activation full day events.

Definition at line 26 of file class.ilDateDurationInputGUI.php.

ilDateDurationInputGUI::$end = null
protected

Definition at line 21 of file class.ilDateDurationInputGUI.php.

Referenced by getEnd().

ilDateDurationInputGUI::$end_text = ''
protected

Definition at line 18 of file class.ilDateDurationInputGUI.php.

Referenced by getEndText().

ilDateDurationInputGUI::$minute_step_size = 5
protected

Definition at line 20 of file class.ilDateDurationInputGUI.php.

Referenced by getMinuteStepSize().

ilDateDurationInputGUI::$show_date = true
protected

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

ilDateDurationInputGUI::$show_empty = false
protected

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

Referenced by getShowEmpty().

ilDateDurationInputGUI::$show_time = true
protected

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

ilDateDurationInputGUI::$start = null
protected

Definition at line 14 of file class.ilDateDurationInputGUI.php.

Referenced by getStart().

ilDateDurationInputGUI::$start_text = ''
protected

Definition at line 17 of file class.ilDateDurationInputGUI.php.

Referenced by getStartText().

ilDateDurationInputGUI::$start_year = null
protected

Definition at line 15 of file class.ilDateDurationInputGUI.php.

ilDateDurationInputGUI::$toggle_fulltime = false
protected

Toggle datetime.

Definition at line 33 of file class.ilDateDurationInputGUI.php.

Referenced by enabledToggleFullTime().

ilDateDurationInputGUI::$toggle_fulltime_checked = false
protected

Definition at line 35 of file class.ilDateDurationInputGUI.php.

ilDateDurationInputGUI::$toggle_fulltime_txt = ''
protected

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


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