ILIAS  Release_5_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.
 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.
 getTableFilterHTML ()
 Used for table filter presentation.
 getValue ()
 Used for storing the date duration data in session for table gui filters.
 setValue ($value)
 Called from table gui with the stored session value Attention: If the user resets the table filter, a boolean false is passed by the table gui.
- 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.

Protected Attributes

 $start = null
 $startyear = 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_empty = false
 $showtime = false
- 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

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.
 getMultiIconsHTML ()
 Get HTML for multiple value icons.

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 14 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 48 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 340 of file class.ilDateDurationInputGUI.php.

References $_POST, $ilUser, $lng, $ok, ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getPostVar(), getShowTime(), IL_CAL_FKT_DATE, IL_CAL_FKT_GETDATE, 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()]['start']["date"]["m"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["date"]["m"]);
$_POST[$this->getPostVar()]['start']["date"]["d"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["date"]["d"]);
$_POST[$this->getPostVar()]['start']["time"]["h"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["time"]["h"]);
$_POST[$this->getPostVar()]['start']["time"]["m"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['start']["time"]["m"]);
$_POST[$this->getPostVar()]['start']["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'];
if($this->getShowTime())
{
$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());
}
else
{
$date = new ilDate($dt,IL_CAL_FKT_GETDATE);
}
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()))
{
// #11847
$this->invalid_input['start'] = $_POST[$this->getPostVar()]['start']["date"];
$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()]['end']["date"]["m"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["date"]["m"]);
$_POST[$this->getPostVar()]['end']["date"]["d"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["date"]["d"]);
$_POST[$this->getPostVar()]['end']["time"]["h"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["time"]["h"]);
$_POST[$this->getPostVar()]['end']["time"]["m"] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]['end']["time"]["m"]);
$_POST[$this->getPostVar()]['end']["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'];
if($this->getShowTime())
{
$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());
}
else
{
$date = new ilDate($dt,IL_CAL_FKT_GETDATE);
}
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->invalid_input['end'] = $_POST[$this->getPostVar()]['end']["date"];
$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 64 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 88 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 77 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 99 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 189 of file class.ilDateDurationInputGUI.php.

References $end.

Referenced by getValue(), and render().

{
return $this->end;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getEndText ( )

Get end text.

Returns

Definition at line 153 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 283 of file class.ilDateDurationInputGUI.php.

References $minute_step_size.

Referenced by render().

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getShowEmpty ( )

Get Show Empty Information.

Returns
boolean Show Empty Information

Definition at line 209 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 239 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 230 of file class.ilDateDurationInputGUI.php.

References $showtime.

Referenced by checkInput(), and render().

{
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getStart ( )

Get Date, yyyy-mm-dd.

Returns
object Date, yyyy-mm-dd

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

References $start.

Referenced by getValue(), and render().

{
return $this->start;
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getStartText ( )

get start text

Returns

Definition at line 134 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 259 of file class.ilDateDurationInputGUI.php.

References $startyear.

Referenced by render().

{
}

+ Here is the caller graph for this function:

ilDateDurationInputGUI::getTableFilterHTML ( )

Used for table filter presentation.

Returns
string

Implements ilTableFilterItem.

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

References render().

{
return $this->render();
}

+ Here is the call graph for this function:

ilDateDurationInputGUI::getValue ( )

Used for storing the date duration data in session for table gui filters.

Returns
array

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

References getEnd(), getStart(), and IL_CAL_UNIX.

{
return array(
'start' => $this->getStart()->get(IL_CAL_UNIX),
'end' => $this->getEnd()->get(IL_CAL_UNIX)
);
}

+ Here is the call graph for this function:

ilDateDurationInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

Definition at line 620 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 449 of file class.ilDateDurationInputGUI.php.

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

Referenced by getTableFilterHTML(), and 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());
}
// display invalid input again
if(is_array($this->invalid_input['start']))
{
$start_info['year'] = $this->invalid_input['start']['y'];
$start_info['mon'] = $this->invalid_input['start']['m'];
$start_info['mday'] = $this->invalid_input['start']['d'];
}
// 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());
}
// display invalid input again
if(is_array($this->invalid_input['end']))
{
$end_info['year'] = $this->invalid_input['end']['y'];
$end_info['mon'] = $this->invalid_input['end']['m'];
$end_info['mday'] = $this->invalid_input['end']['d'];
}
$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();
}
$tpl->setVariable('POST_VAR',$this->getPostVar());
include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
$tpl->setVariable("IMG_START_CALENDAR", ilGlyphGUI::get(ilGlyphGUI::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->getStartYear(),
true,
array(
'disabled' => $this->getDisabled(),
'select_attributes' => array('onchange' => 'ilUpdateEndDate();')
),
$this->getShowEmpty()));
include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
$tpl->setVariable("IMG_END_CALENDAR", ilGlyphGUI::get(ilGlyphGUI::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->getStartYear(),
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())
{
$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 179 of file class.ilDateDurationInputGUI.php.

Referenced by checkInput(), render(), setValue(), 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 144 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 272 of file class.ilDateDurationInputGUI.php.

{
$this->minute_step_size = $a_step_size;
}
ilDateDurationInputGUI::setShowEmpty (   $a_empty)

Set Show Empty Information.

Parameters
booleanShow Empty Information

Definition at line 199 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 220 of file class.ilDateDurationInputGUI.php.

Referenced by ilObjTestSettingsGeneralGUI\addAvailabilityProperties(), ilObjPollGUI\initEditCustomForm(), ilObjPortfolioTemplateGUI\initEditCustomForm(), ilObjCourseGUI\initEditForm(), and ilObjSurveyGUI\initPropertiesForm().

{
$this->showtime = $a_showtime;
}

+ Here is the caller graph for this function:

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 115 of file class.ilDateDurationInputGUI.php.

Referenced by checkInput(), render(), setValue(), 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 125 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 249 of file class.ilDateDurationInputGUI.php.

{
$this->startyear = $a_year;
}
ilDateDurationInputGUI::setValue (   $value)

Called from table gui with the stored session value Attention: If the user resets the table filter, a boolean false is passed by the table gui.

See Also
getValue()
Parameters
array | bool$value

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

References IL_CAL_UNIX, setEnd(), and setStart().

{
if(is_array($value))
{
$this->setStart(new ilDateTime($value['start'], IL_CAL_UNIX));
$this->setEnd(new ilDateTime($value['end'], IL_CAL_UNIX));
}
}

+ Here is the call graph for this function:

ilDateDurationInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

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

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

{
global $ilUser;
try {
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);
}
}
{
// Nothing
}
}

+ Here is the call graph for this function:

Field Documentation

ilDateDurationInputGUI::$activation_checked = true
protected

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

ilDateDurationInputGUI::$activation_post_var = ''
protected

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

Referenced by getActivationPostVar().

ilDateDurationInputGUI::$activation_title = ''
protected

Activation full day events.

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

ilDateDurationInputGUI::$end = null
protected

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

Referenced by getEnd().

ilDateDurationInputGUI::$end_text = ''
protected

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

Referenced by getEndText().

ilDateDurationInputGUI::$minute_step_size = 5
protected

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

Referenced by getMinuteStepSize().

ilDateDurationInputGUI::$show_empty = false
protected

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

Referenced by getShowEmpty().

ilDateDurationInputGUI::$showtime = false
protected

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

Referenced by getShowTime().

ilDateDurationInputGUI::$start = null
protected

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

Referenced by getStart().

ilDateDurationInputGUI::$start_text = ''
protected

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

Referenced by getStartText().

ilDateDurationInputGUI::$startyear = null
protected

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

Referenced by getStartYear().

ilDateDurationInputGUI::$toggle_fulltime = false
protected

Toggle datetime.

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

Referenced by enabledToggleFullTime().

ilDateDurationInputGUI::$toggle_fulltime_checked = false
protected

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

ilDateDurationInputGUI::$toggle_fulltime_txt = ''
protected

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


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