ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilGloAdvColSortInputGUI 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 ilGloAdvColSortInputGUI:
+ Collaboration diagram for ilGloAdvColSortInputGUI:

Public Member Functions

 __construct (string $a_title="", string $a_id="")
 
 setValue (array $a_value)
 
 getValue ()
 
 checkInput ()
 Input should always be valid, since we sort only. More...
 
 getInput ()
 
 render ()
 
 insert (ilTemplate $a_tpl)
 
 setValueByArray (array $a_values)
 
 getTableFilterHTML ()
 
- 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...
 

Protected Attributes

array $value
 
- 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
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $a_text)
 Remove prohibited characters see #19159. More...
 
- 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)
 

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 Input for adv meta data column sorting in glossaries. Please note, that data us already an array, we do not use the MultipleValues interface here.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilGloAdvColSortInputGUI::__construct ( string  $a_title = "",
string  $a_id = "" 
)

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\lng(), and ilFormPropertyGUI\setType().

33  {
34  global $DIC;
35 
36  $this->lng = $DIC->language();
37  parent::__construct($a_title, $a_id);
38  $this->setType("glo_adv_col_sort");
39  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilGloAdvColSortInputGUI::checkInput ( )

Input should always be valid, since we sort only.

Definition at line 55 of file class.ilGloAdvColSortInputGUI.php.

55  : bool
56  {
57  return true;
58  }

◆ getInput()

ilGloAdvColSortInputGUI::getInput ( )

Definition at line 60 of file class.ilGloAdvColSortInputGUI.php.

References ilFormPropertyGUI\arrayArray(), ilFormPropertyGUI\getPostVar(), and ilArrayUtil\stripSlashesRecursive().

60  : array
61  {
62  $val = $this->arrayArray($this->getPostVar());
64  return $val;
65  }
static stripSlashesRecursive($a_data, bool $a_strip_html=true, string $a_allow="")
+ Here is the call graph for this function:

◆ getTableFilterHTML()

ilGloAdvColSortInputGUI::getTableFilterHTML ( )

Definition at line 106 of file class.ilGloAdvColSortInputGUI.php.

References render().

106  : string
107  {
108  $html = $this->render();
109  return $html;
110  }
+ Here is the call graph for this function:

◆ getValue()

ilGloAdvColSortInputGUI::getValue ( )

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

References $value.

Referenced by render().

46  : array
47  {
48  return $this->value;
49  }
+ Here is the caller graph for this function:

◆ insert()

ilGloAdvColSortInputGUI::insert ( ilTemplate  $a_tpl)

Definition at line 92 of file class.ilGloAdvColSortInputGUI.php.

References ilTemplate\parseCurrentBlock(), render(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

92  : void
93  {
94  $a_tpl->setCurrentBlock("prop_generic");
95  $a_tpl->setVariable("PROP_GENERIC", $this->render());
96  $a_tpl->parseCurrentBlock();
97  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ render()

ilGloAdvColSortInputGUI::render ( )

Definition at line 67 of file class.ilGloAdvColSortInputGUI.php.

References ilFormPropertyGUI\$lng, $tpl, ilGlyphGUI\DOWN, ilGlyphGUI\get(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getPostVar(), getValue(), ilLegacyFormElementsUtil\prepareFormOutput(), ilLanguage\txt(), and ilGlyphGUI\UP.

Referenced by getTableFilterHTML(), and insert().

67  : string
68  {
69  $lng = $this->lng;
70 
71  $tpl = new ilTemplate("tpl.adv_col_sort_input.html", true, true, "Modules/Glossary");
72  if (is_array($this->getValue())) {
73  foreach ($this->getValue() as $k => $v) {
74  $tpl->setCurrentBlock("item");
75  $tpl->setVariable("TEXT", $v["text"]);
76  $tpl->setVariable("ID", $this->getFieldId() . "~" . $k);
77  $tpl->setVariable("DOWN", ilGlyphGUI::get(ilGlyphGUI::DOWN));
78  $tpl->setVariable("TXT_DOWN", $lng->txt("down"));
79  $tpl->setVariable("UP", ilGlyphGUI::get(ilGlyphGUI::UP));
80  $tpl->setVariable("TXT_UP", $lng->txt("up"));
81  $tpl->setVariable('NAME', $this->getPostVar() . "[" . $k . "][id]");
82  $tpl->setVariable('TNAME', $this->getPostVar() . "[" . $k . "][text]");
83  $tpl->setVariable('VAL', ilLegacyFormElementsUtil::prepareFormOutput($v["id"]));
84  $tpl->setVariable('TVAL', ilLegacyFormElementsUtil::prepareFormOutput($v["text"]));
85  $tpl->parseCurrentBlock();
86  }
87  }
88 
89  return $tpl->get();
90  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static get(string $a_glyph, string $a_text="")
static prepareFormOutput($a_str, bool $a_strip=false)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValue()

ilGloAdvColSortInputGUI::setValue ( array  $a_value)

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

Referenced by setValueByArray().

41  : void
42  {
43  $this->value = $a_value;
44  }
+ Here is the caller graph for this function:

◆ setValueByArray()

ilGloAdvColSortInputGUI::setValueByArray ( array  $a_values)

Definition at line 99 of file class.ilGloAdvColSortInputGUI.php.

References ilFormPropertyGUI\getPostVar(), and setValue().

99  : void
100  {
101  if ($this->getPostVar() && isset($a_values[$this->getPostVar()])) {
102  $this->setValue($a_values[$this->getPostVar()]);
103  }
104  }
+ Here is the call graph for this function:

Field Documentation

◆ $value

array ilGloAdvColSortInputGUI::$value
protected

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

Referenced by getValue().


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