ILIAS  release_4-4 Revision
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...
 

Additional Inherited Members

- 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
 $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
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters

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

References ilFormPropertyGUI\setType().

24  {
25  parent::__construct($a_title, $a_id);
26  $this->setType("glo_adv_col_sort");
27  }
setType($a_type)
Set Type.
+ 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  {
60  $_POST[$this->getPostVar()][$k]["id"] = ilUtil::stripSlashes($_POST[$this->getPostVar()][$k]["id"]);
61  $_POST[$this->getPostVar()][$k]["text"] = ilUtil::stripSlashes($_POST[$this->getPostVar()][$k]["text"]);
62  }
63  }
64  else
65  {
66  $_POST[$this->getPostVar()] = array();
67  }
68 
69  return true;
70  }
$_POST['username']
Definition: cron.php:12
getPostVar()
Get Post Variable.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ getTableFilterHTML()

ilGloAdvColSortInputGUI::getTableFilterHTML ( )

Get HTML for table filter.

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

References render().

130  {
131  $html = $this->render();
132  return $html;
133  }
+ 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 106 of file class.ilGloAdvColSortInputGUI.php.

References render().

107  {
108  $a_tpl->setCurrentBlock("prop_generic");
109  $a_tpl->setVariable("PROP_GENERIC", $this->render());
110  $a_tpl->parseCurrentBlock();
111  }
+ Here is the call graph for this function:

◆ render()

ilGloAdvColSortInputGUI::render ( )

render

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

References $lng, $tpl, ilFormPropertyGUI\getFieldId(), ilUtil\getImagePath(), ilFormPropertyGUI\getPostVar(), getValue(), and ilUtil\prepareFormOutput().

Referenced by getTableFilterHTML(), and insert().

76  {
77  global $lng;
78 
79  $tpl = new ilTemplate("tpl.adv_col_sort_input.html", true, true, "Modules/Glossary");
80  if (is_array($this->getValue()))
81  {
82  foreach ($this->getValue() as $k => $v)
83  {
84  $tpl->setCurrentBlock("item");
85  $tpl->setVariable("TEXT", $v["text"]);
86  $tpl->setVariable("ID", $this->getFieldId()."~".$k);
87  $tpl->setVariable("SRC_DOWN", ilUtil::getImagePath('icon_down_s.png'));
88  $tpl->setVariable("TXT_DOWN", $lng->txt("down"));
89  $tpl->setVariable("SRC_UP", ilUtil::getImagePath('icon_up_s.png'));
90  $tpl->setVariable("TXT_UP", $lng->txt("up"));
91  $tpl->setVariable('NAME', $this->getPostVar()."[".$k."][id]");
92  $tpl->setVariable('TNAME', $this->getPostVar()."[".$k."][text]");
93  $tpl->setVariable('VAL', ilUtil::prepareFormOutput($v["id"]));
94  $tpl->setVariable('TVAL', ilUtil::prepareFormOutput($v["text"]));
95  $tpl->parseCurrentBlock();
96  }
97  }
98 
99  return $tpl->get();
100  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getPostVar()
Get Post Variable.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $lng
Definition: privfeed.php:40
+ 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 118 of file class.ilGloAdvColSortInputGUI.php.

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

119  {
120  if ($this->getPostVar() && isset($a_values[$this->getPostVar()]))
121  {
122  $this->setValue($a_values[$this->getPostVar()]);
123  }
124  }
getPostVar()
Get Post Variable.
+ Here is the call graph for this function:

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