ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilChatroomMessageDeletionThresholdInputGUI Class Reference

Class ilChatroomMessageDeletionThresholdInputGUI. More...

+ Inheritance diagram for ilChatroomMessageDeletionThresholdInputGUI:
+ Collaboration diagram for ilChatroomMessageDeletionThresholdInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="", ilSelectInputGUI $thresholdUnits)
 ilChatroomMessageDeletionThresholdInputGUI constructor. More...
 
 checkInput ()
 
- Public Member Functions inherited from ilNumberInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setSuffix ($a_value)
 Set suffix. More...
 
 getSuffix ()
 Get suffix. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setMaxLength ($a_maxlength)
 Set Max Length. More...
 
 getMaxLength ()
 Get Max Length. More...
 
 setMinvalueShouldBeGreater ($a_bool)
 Set minvalueShouldBeGreater. More...
 
 minvalueShouldBeGreater ()
 Get minvalueShouldBeGreater. More...
 
 setMaxvalueShouldBeLess ($a_bool)
 Set maxvalueShouldBeLess. More...
 
 maxvalueShouldBeLess ()
 Get maxvalueShouldBeLess. More...
 
 setSize ($a_size)
 Set Size. More...
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 getSize ()
 Get Size. More...
 
 setMinValue ($a_minvalue, $a_display_always=false)
 Set Minimum Value. More...
 
 getMinValue ()
 Get Minimum Value. More...
 
 setMaxValue ($a_maxvalue, $a_display_always=false)
 Set Maximum Value. More...
 
 getMaxValue ()
 Get Maximum Value. More...
 
 setDecimals ($a_decimals)
 Set Decimal Places. More...
 
 getDecimals ()
 Get Decimal Places. More...
 
 allowDecimals ($a_value)
 Toggle Decimals. More...
 
 areDecimalsAllowed ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 insert ($a_tpl)
 Insert property html. More...
 
 render ()
 Insert property html. More...
 
 getPostValueForComparison ()
 parse post value to make it comparable More...
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 

Protected Attributes

 $thresholdUnits
 
- Protected Attributes inherited from ilNumberInputGUI
 $value
 
 $maxlength = 200
 
 $size = 40
 
 $suffix
 
 $minvalue = false
 
 $minvalueShouldBeGreater = false
 
 $minvalue_visible = false
 
 $maxvalue = false
 
 $maxvalueShouldBeLess = false
 
 $maxvalue_visible = false
 
 $decimals
 
 $allow_decimals = 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

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilChatroomMessageDeletionThresholdInputGUI::__construct (   $a_title = "",
  $a_postvar = "",
ilSelectInputGUI  $thresholdUnits 
)

ilChatroomMessageDeletionThresholdInputGUI constructor.

Parameters
string$a_title
string$a_postvar
ilSelectInputGUI$thresholdUnits

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

References $thresholdUnits.

20  {
21  parent::__construct($a_title, $a_postvar);
22  $this->thresholdUnits = $thresholdUnits;
23  }

Member Function Documentation

◆ checkInput()

ilChatroomMessageDeletionThresholdInputGUI::checkInput ( )

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

References $_POST, $GLOBALS, array, ilNumberInputGUI\getValue(), ilFormPropertyGUI\setAlert(), and ilNumberInputGUI\setValueByArray().

29  {
30  $isValid = parent::checkInput();
31 
32  if(!$isValid)
33  {
34  return false;
35  }
36 
37  $this->setValueByArray((array)$_POST);
38  $this->thresholdUnits->setValueByArray((array)$_POST);
39 
40  $unit = $this->thresholdUnits->getValue();
41  switch(true)
42  {
43  case $unit == 'days' && $this->getValue() > 31:
44  $this->setAlert(sprintf(
45  $GLOBALS['DIC']->language()->txt('chat_deletion_ival_max_val'),
46  $GLOBALS['DIC']->language()->txt('days'),
47  31
48  ));
49  return false;
50  break;
51 
52  case $unit == 'weeks' && $this->getValue() > 52:
53  $this->setAlert(sprintf(
54  $GLOBALS['DIC']->language()->txt('chat_deletion_ival_max_val'),
55  $GLOBALS['DIC']->language()->txt('weeks'),
56  52
57  ));
58  return false;
59  break;
60 
61  case $unit == 'months' && $this->getValue() > 12:
62  $this->setAlert(sprintf(
63  $GLOBALS['DIC']->language()->txt('chat_deletion_ival_max_val'),
64  $GLOBALS['DIC']->language()->txt('months'),
65  12
66  ));
67  return false;
68  break;
69  }
70 
71  return true;
72  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setAlert($a_alert)
Set Alert Text.
Create styles array
The data for the language used.
setValueByArray($a_values)
Set value by array.
$_POST["username"]
+ Here is the call graph for this function:

Field Documentation

◆ $thresholdUnits

ilChatroomMessageDeletionThresholdInputGUI::$thresholdUnits
protected

Definition at line 11 of file class.ilChatroomMessageDeletionThresholdInputGUI.php.

Referenced by __construct().


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