ILIAS  release_8 Revision v8.24
ilDclMultiTextInputGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilDclMultiTextInputGUI:
+ Collaboration diagram for ilDclMultiTextInputGUI:

Public Member Functions

 setValues ($values)
 
 getValues ()
 
 setValue ($value)
 
 getValue ()
 
 setMultiValues (array $values)
 
 getMultiValues ()
 
 render (string $a_mode="")
 
- Public Member Functions inherited from ilMultipleTextsInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 isEditElementOccuranceEnabled ()
 
 setEditElementOccuranceEnabled ($editElementOccuranceEnabled)
 
 isEditElementOrderEnabled ()
 
 setEditElementOrderEnabled ($editElementOrderEnabled)
 
 onCheckInput ()
 Check input, strip slashes etc. More...
 
 render (string $a_mode="")
 
- Public Member Functions inherited from ilIdentifiedMultiValuesInputGUI
 __construct ($a_title="", $a_postvar="")
 
 getElementAddCmd ()
 
 setElementAddCmd ($elementAddCmd)
 
 getElementRemoveCmd ()
 
 setElementRemoveCmd ($elementRemoveCmd)
 
 getElementMoveUpCommand ()
 
 setElementMoveUpCommand ($elementMoveUpCommand)
 
 getElementMoveDownCommand ()
 
 setElementMoveDownCommand ($elementMoveDownCommand)
 
 setValues ($values)
 
 getValues ()
 
 setValue ($value)
 
 getValue ()
 
 setMultiValues (array $values)
 
 getMultiValues ()
 
 setIdentifiedMultiValues ($values)
 
 getIdentifiedMultiValues ()
 
 setValueByArray (array $a_values)
 
 getInput ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 onCheckInput ()
 
 prepareReprintable (assQuestion $question)
 
- Public Member Functions inherited from ilTextInputGUI
 __construct (string $a_title="", string $a_postvar="")
 
 setValue ($a_value)
 
 getValue ()
 
 setValidationFailureMessage (string $a_msg)
 
 getValidationFailureMessage ()
 
 setValidationRegexp (string $a_value)
 
 getValidationRegexp ()
 
 setMaxLength (?int $a_maxlength)
 
 getMaxLength ()
 
 setSize (int $a_size)
 
 setInlineStyle (string $a_style)
 
 getInlineStyle ()
 
 setCssClass (string $a_class)
 
 getCssClass ()
 
 setValueByArray (array $a_values)
 
 getSize ()
 
 setSuffix (string $a_value)
 
 getSuffix ()
 
 setInputType (string $a_type)
 set input type More...
 
 getInputType ()
 
 setSubmitFormOnEnter (bool $a_val)
 
 getSubmitFormOnEnter ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
 getDataSource ()
 
 setDataSource (string $href, string $a_delimiter=null)
 
 setDataSourceSubmitOnSelection (bool $a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl (string $a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 render (string $a_mode="")
 
 insert (ilTemplate $a_tpl)
 
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 
 setDisableHtmlAutoComplete (bool $autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
 getPostValueForComparison ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem (ilFormPropertyGUI $a_item)
 
 getSubItems ()
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct (string $a_title="", string $a_postvar="")
 
 executeCommand ()
 
 getType ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setPostVar (string $a_postvar)
 
 getPostVar ()
 
 getFieldId ()
 
 setInfo (string $a_info)
 
 getInfo ()
 
 setAlert (string $a_alert)
 
 getAlert ()
 
 setRequired (bool $a_required)
 
 getRequired ()
 
 setDisabled (bool $a_disabled)
 
 getDisabled ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm (ilPropertyFormGUI $a_parentform)
 
 getParentForm ()
 
 setParent (ilFormPropertyGUI $a_val)
 
 getParent ()
 
 getSubForm ()
 
 hideSubForm ()
 
 setHiddenTitle (string $a_val)
 
 getHiddenTitle ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
 serializeData ()
 
 unserializeData (string $a_data)
 
 setParentTable ($a_val)
 Set parent table. More...
 
 getParentTable ()
 Get parent table. More...
 
 writeToSession ()
 
 clearFromSession ()
 
 readFromSession ()
 
 getHiddenTag (string $a_post_var, string $a_value)
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 getMulti ()
 
 setMultiValues (array $a_values)
 
 getMultiValues ()
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback (string $a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 
 setRequestParam (string $key, $val)
 This writes the request (aka post) values. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $a_text)
 Remove prohibited characters see #19159. More...
 
- Data Fields inherited from ilIdentifiedMultiValuesInputGUI
const ELEMENT_DEFAULT_ADD_CMD = 'addElement'
 
const ELEMENT_DEFAULT_REMOVE_CMD = 'removeElement'
 
const ELEMENT_DEFAULT_MOVE_UP_CMD = 'moveUpElement'
 
const ELEMENT_DEFAULT_MOVE_DOWN_CMD = 'moveDownElement'
 
- Protected Member Functions inherited from ilMultipleTextsInputGUI
 valueHasContentText ($value)
 
 fetchContentTextFromValue ($value)
 
- Protected Member Functions inherited from ilIdentifiedMultiValuesInputGUI
 getMultiValueSubFieldId ($identifier, $subFieldIndex)
 
 getMultiValuePosIndexedFieldId ($identifier, $positionIndex)
 
 getMultiValuePosIndexedSubFieldId ($identifier, $subFieldIndex, $positionIndex)
 
 getFieldIdFromPostVar ($tempPostVar)
 
 getPostVarSubField ($subFieldIndex)
 
 getMultiValuePostVarSubField ($identifier, $subFieldIndex)
 
 getMultiValuePostVarSubFieldPosIndexed ($identifier, $subFieldIndex, $positionIndex)
 
 getMultiValuePostVarPosIndexed ($identifier, $positionIndex)
 
 getMultiValuePostVar ($identifier)
 
 buildMultiValueSubmitVar ($identifier, $positionIndex, $submitCommand)
 
 setIdentifiedMultiValuesByArray ($a_values)
 
 prepareMultiValuesInput ($values)
 
 prepareMultiValuesSubmit ($values)
 
 getFormValuesManipulators ()
 
 addFormValuesManipulator (ilFormValuesManipulator $manipulator)
 
 getSubFieldCompletedPostVar ($subFieldIndex, $elemPostVar)
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType (string $a_type)
 
 checkParentFormTable ()
 
 getSessionKey ()
 
 getMultiIconsHTML ()
 
 int ($key)
 
 intArray ($key)
 
 str ($key)
 
 raw ($key)
 
 strArray ($key)
 
 arrayArray ($key)
 
 isRequestParamArray (string $key)
 
 getRequestParam (string $key, Refinery\Transformation $t)
 
- Protected Attributes inherited from ilMultipleTextsInputGUI
 $editElementOccuranceEnabled = false
 
 $editElementOrderEnabled = false
 
- Protected Attributes inherited from ilIdentifiedMultiValuesInputGUI
 $elementAddCmd = self::ELEMENT_DEFAULT_ADD_CMD
 
 $elementRemoveCmd = self::ELEMENT_DEFAULT_REMOVE_CMD
 
 $elementMoveUpCommand = self::ELEMENT_DEFAULT_MOVE_UP_CMD
 
 $elementMoveDownCommand = self::ELEMENT_DEFAULT_MOVE_DOWN_CMD
 
 $identified_multi_values = array()
 
 $formValuesManipulationChain = array()
 
- Protected Attributes inherited from ilTextInputGUI
 $value = null
 
int $maxlength = 200
 
int $size = 40
 
string $validationRegexp = ""
 
string $validationFailureMessage = ''
 
string $suffix = ""
 
string $style_css = ""
 
string $css_class = ""
 
string $ajax_datasource = ""
 
string $ajax_datasource_delimiter = null
 
bool $ajax_datasource_commit = false
 
string $ajax_datasource_commit_url = ""
 
bool $submit_form_on_enter = false
 
bool $autocomplete_disabled = false
 
string $input_type = ""
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
array $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
array $set_params = []
 
ilTable2GUI $parent_table = null
 
ilFormPropertyGUI $parent_gui = null
 
ilCtrl $ctrl
 
ilLanguage $lng
 
string $type = ""
 
string $title = ""
 
string $postvar = ""
 
string $info = ""
 
string $alert = ""
 
bool $required = false
 
ilPropertyFormGUI $parentform = null
 
string $hidden_title = ""
 
bool $multi = false
 
bool $multi_sortable = false
 
bool $multi_addremove = true
 
array $multi_values = []
 
RequestInterface $request
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
bool $disabled = false
 
ilGlobalTemplateInterface $global_tpl = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Member Function Documentation

◆ getMultiValues()

ilDclMultiTextInputGUI::getMultiValues ( )

Reimplemented from ilIdentifiedMultiValuesInputGUI.

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

References ilIdentifiedMultiValuesInputGUI\getIdentifiedMultiValues().

+ Here is the call graph for this function:

◆ getValue()

ilDclMultiTextInputGUI::getValue ( )
Returns
array|string

Reimplemented from ilIdentifiedMultiValuesInputGUI.

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

36 : array
37 {
38 return $this->getIdentifiedMultiValues();
39 }

References ilIdentifiedMultiValuesInputGUI\getIdentifiedMultiValues().

+ Here is the call graph for this function:

◆ getValues()

ilDclMultiTextInputGUI::getValues ( )
Returns
mixed
Exceptions
ilFormException

Reimplemented from ilIdentifiedMultiValuesInputGUI.

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

26 : array
27 {
28 return $this->getIdentifiedMultiValues();
29 }

References ilIdentifiedMultiValuesInputGUI\getIdentifiedMultiValues().

+ Here is the call graph for this function:

◆ render()

ilDclMultiTextInputGUI::render ( string  $a_mode = "")
Parameters
string$mode
Returns
string

Reimplemented from ilMultipleTextsInputGUI.

Definition at line 51 of file class.ilDclMultiTextInputGUI.php.

51 : string
52 {
53 $tpl = new ilTemplate("tpl.prop_multi_text_inp.html", true, true, "Services/Form");
54 $i = 0;
55 foreach ($this->getIdentifiedMultiValues() as $identifier => $value) {
56 if (is_array($value)) {
57 $value = array_shift($value);
58 }
59 if (strlen($value)) {
60 $tpl->setCurrentBlock("prop_text_propval");
61 $tpl->setVariable("PROPERTY_VALUE", ilLegacyFormElementsUtil::prepareFormOutput($value));
62 $tpl->parseCurrentBlock();
63 }
64 if ($this->isEditElementOrderEnabled()) {
65 $tpl->setCurrentBlock("move");
66 $tpl->setVariable("ID_UP", $this->getMultiValuePosIndexedSubFieldId($identifier, 'up', $i));
67 $tpl->setVariable("ID_DOWN", $this->getMultiValuePosIndexedSubFieldId($identifier, 'down', $i));
68 $tpl->setVariable("CMD_UP", $this->buildMultiValueSubmitVar($identifier, $i, 'up'));
69 $tpl->setVariable("CMD_DOWN", $this->buildMultiValueSubmitVar($identifier, $i, 'down'));
70 $tpl->setVariable("ID", $this->getMultiValuePosIndexedFieldId($identifier, $i));
71 $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
72 $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
73 $tpl->parseCurrentBlock();
74 }
75 $tpl->setCurrentBlock("row");
76 $tpl->setVariable("POST_VAR", $this->getMultiValuePostVarPosIndexed($identifier, $i));
77 $tpl->setVariable("ID", $this->getMultiValuePosIndexedFieldId($identifier, $i));
78 $tpl->setVariable("SIZE", $this->getSize());
79 $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
80
81 if ($this->getDisabled()) {
82 $tpl->setVariable(
83 "DISABLED",
84 " disabled=\"disabled\""
85 );
86 } elseif ($this->isEditElementOccuranceEnabled()) {
87 $tpl->setVariable("ID_ADD", $this->getMultiValuePosIndexedSubFieldId($identifier, 'add', $i));
88 $tpl->setVariable("ID_REMOVE", $this->getMultiValuePosIndexedSubFieldId($identifier, 'remove', $i));
89 $tpl->setVariable("CMD_ADD", $this->buildMultiValueSubmitVar($identifier, $i, 'add'));
90 $tpl->setVariable("CMD_REMOVE", $this->buildMultiValueSubmitVar($identifier, $i, 'remove'));
91 $tpl->setVariable("ADD_BUTTON", ilGlyphGUI::get(ilGlyphGUI::ADD));
92 $tpl->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
93 }
94
95 $tpl->parseCurrentBlock();
96 $i++;
97 }
98 $tpl->setVariable("ELEMENT_ID", $this->getFieldId());
99
100 if (!$this->getDisabled()) {
101 $globalTpl = $GLOBALS['DIC'] ? $GLOBALS['DIC']['tpl'] : $GLOBALS['tpl'];
102 $globalTpl->addJavascript("./Services/Form/js/ServiceFormWizardInput.js");
103 $globalTpl->addJavascript("./Services/Form/js/ServiceFormIdentifiedWizardInputExtend.js");
104
105 $globalTpl->addJavascript("./Services/Form/js/ServiceFormMultiTextInputInit.js");
106 }
107
108 return $tpl->get();
109 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static get(string $a_glyph, string $a_text="")
getMultiValuePosIndexedSubFieldId($identifier, $subFieldIndex, $positionIndex)
buildMultiValueSubmitVar($identifier, $positionIndex, $submitCommand)
static prepareFormOutput($a_str, bool $a_strip=false)
special template class to simplify handling of ITX/PEAR
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
$i
Definition: metadata.php:41

References $GLOBALS, $i, $tpl, ilTextInputGUI\$value, ilGlyphGUI\ADD, ilIdentifiedMultiValuesInputGUI\buildMultiValueSubmitVar(), ilGlyphGUI\DOWN, ilGlyphGUI\get(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilIdentifiedMultiValuesInputGUI\getIdentifiedMultiValues(), ilTextInputGUI\getMaxLength(), ilIdentifiedMultiValuesInputGUI\getMultiValuePosIndexedFieldId(), ilIdentifiedMultiValuesInputGUI\getMultiValuePosIndexedSubFieldId(), ilIdentifiedMultiValuesInputGUI\getMultiValuePostVarPosIndexed(), ilTextInputGUI\getSize(), ilMultipleTextsInputGUI\isEditElementOccuranceEnabled(), ilMultipleTextsInputGUI\isEditElementOrderEnabled(), ilLegacyFormElementsUtil\prepareFormOutput(), ilGlyphGUI\REMOVE, and ilGlyphGUI\UP.

+ Here is the call graph for this function:

◆ setMultiValues()

ilDclMultiTextInputGUI::setMultiValues ( array  $values)

Reimplemented from ilIdentifiedMultiValuesInputGUI.

Definition at line 41 of file class.ilDclMultiTextInputGUI.php.

41 : void
42 {
43 $this->setIdentifiedMultiValues($values);
44 }

References ilIdentifiedMultiValuesInputGUI\setIdentifiedMultiValues().

+ Here is the call graph for this function:

◆ setValue()

ilDclMultiTextInputGUI::setValue (   $a_value)
Parameters
string | array$a_value

Reimplemented from ilIdentifiedMultiValuesInputGUI.

Definition at line 31 of file class.ilDclMultiTextInputGUI.php.

31 : void
32 {
34 }

References ilTextInputGUI\$value, and ilIdentifiedMultiValuesInputGUI\setIdentifiedMultiValues().

+ Here is the call graph for this function:

◆ setValues()

ilDclMultiTextInputGUI::setValues (   $values)

Reimplemented from ilIdentifiedMultiValuesInputGUI.

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

21 : void
22 {
23 $this->setIdentifiedMultiValues($values);
24 }

References ilIdentifiedMultiValuesInputGUI\setIdentifiedMultiValues().

+ Here is the call graph for this function:

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