ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilGloAdvColSortInputGUI Class Reference

Input for adv meta data column sorting in glossaries. More...

+ Inheritance diagram for ilGloAdvColSortInputGUI:
+ Collaboration diagram for ilGloAdvColSortInputGUI:

Public Member Functions

 __construct ($a_title="", $a_id="")
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 checkInput ()
 Input should always be valid, since we sort only. More...
 
 render ()
 render More...
 
 insert (&$a_tpl)
 Insert property html. More...
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. 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...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 

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...
 
- Protected Attributes inherited from ilFormPropertyGUI
 $ctrl
 
 $lng
 
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Detailed Description

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
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters

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

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

21  {
22  global $DIC;
23 
24  $this->lng = $DIC->language();
25  parent::__construct($a_title, $a_id);
26  $this->setType("glo_adv_col_sort");
27  }
setType($a_type)
Set Type.
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilGloAdvColSortInputGUI::checkInput ( )

Input should always be valid, since we sort only.

Returns
boolean

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

References $_POST, ilFormPropertyGUI\getPostVar(), and ilUtil\stripSlashes().

56  {
57  if (is_array($_POST[$this->getPostVar()])) {
58  foreach ($_POST[$this->getPostVar()] as $k => $v) {
59  $_POST[$this->getPostVar()][$k]["id"] = ilUtil::stripSlashes($_POST[$this->getPostVar()][$k]["id"]);
60  $_POST[$this->getPostVar()][$k]["text"] = ilUtil::stripSlashes($_POST[$this->getPostVar()][$k]["text"]);
61  }
62  } else {
63  $_POST[$this->getPostVar()] = array();
64  }
65 
66  return true;
67  }
getPostVar()
Get Post Variable.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:

◆ getTableFilterHTML()

ilGloAdvColSortInputGUI::getTableFilterHTML ( )

Get HTML for table filter.

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

References render().

124  {
125  $html = $this->render();
126  return $html;
127  }
+ Here is the call graph for this function:

◆ getValue()

ilGloAdvColSortInputGUI::getValue ( )

Get Value.

Returns
string Value

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

Referenced by render().

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

◆ insert()

ilGloAdvColSortInputGUI::insert ( $a_tpl)

Insert property html.

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

References render().

102  {
103  $a_tpl->setCurrentBlock("prop_generic");
104  $a_tpl->setVariable("PROP_GENERIC", $this->render());
105  $a_tpl->parseCurrentBlock();
106  }
+ Here is the call graph for this function:

◆ render()

ilGloAdvColSortInputGUI::render ( )

render

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

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

Referenced by getTableFilterHTML(), and insert().

73  {
74  $lng = $this->lng;
75 
76  $tpl = new ilTemplate("tpl.adv_col_sort_input.html", true, true, "Modules/Glossary");
77  if (is_array($this->getValue())) {
78  foreach ($this->getValue() as $k => $v) {
79  $tpl->setCurrentBlock("item");
80  $tpl->setVariable("TEXT", $v["text"]);
81  $tpl->setVariable("ID", $this->getFieldId() . "~" . $k);
82  $tpl->setVariable("DOWN", ilGlyphGUI::get(ilGlyphGUI::DOWN));
83  $tpl->setVariable("TXT_DOWN", $lng->txt("down"));
84  $tpl->setVariable("UP", ilGlyphGUI::get(ilGlyphGUI::UP));
85  $tpl->setVariable("TXT_UP", $lng->txt("up"));
86  $tpl->setVariable('NAME', $this->getPostVar() . "[" . $k . "][id]");
87  $tpl->setVariable('TNAME', $this->getPostVar() . "[" . $k . "][text]");
88  $tpl->setVariable('VAL', ilUtil::prepareFormOutput($v["id"]));
89  $tpl->setVariable('TVAL', ilUtil::prepareFormOutput($v["text"]));
90  $tpl->parseCurrentBlock();
91  }
92  }
93 
94  return $tpl->get();
95  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
getPostVar()
Get Post Variable.
static get($a_glyph, $a_text="")
Get glyph html.
getFieldId()
Get Post Variable.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValue()

ilGloAdvColSortInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

Referenced by ilObjGlossaryGUI\initSettingsForm(), and setValueByArray().

35  {
36  $this->value = $a_value;
37  }
+ Here is the caller graph for this function:

◆ setValueByArray()

ilGloAdvColSortInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

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

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

114  {
115  if ($this->getPostVar() && isset($a_values[$this->getPostVar()])) {
116  $this->setValue($a_values[$this->getPostVar()]);
117  }
118  }
getPostVar()
Get Post Variable.
+ Here is the call graph for this function:

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