ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilOrgUnitMultiLineInputGUI Class Reference

Class ilOrgUnitMultiLineInputGUI. More...

+ Inheritance diagram for ilOrgUnitMultiLineInputGUI:
+ Collaboration diagram for ilOrgUnitMultiLineInputGUI:

Public Member Functions

 __construct (string $a_title="", string $a_postvar="")
 Constructor. More...
 
 getHook (string $key)
 
 addHook (string $key, array $options)
 
 removeHook (string $key)
 
 addInput (\ilFormPropertyGUI $input, array $options=array())
 
 getTemplateDir ()
 
 setTemplateDir (string $template_dir)
 
 isShowLabel ()
 
 setShowLabel (bool $show_label)
 
 getInputs ()
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 setValue (string $a_value)
 
 getValue ()
 
 setValueByArray (array $a_values)
 Set value by array. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 addCustomAttribute (string $key, string $value, bool $override=false)
 
 getCustomAttributes ()
 
 render (int $iterator_id=0, bool $clean_render=false)
 
 initCSSandJS ()
 
 insert (ilTemplate $a_tpl)
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
 getToolbarHTML ()
 Get HTML for toolbar. More...
 
 isPositionMovable ()
 
 setPositionMovable (bool $position_movable)
 
 isShowLabelOnce ()
 
 setShowLabelOnce (bool $show_label_once)
 
 isShowInfo ()
 
 setShowInfo (bool $show_info)
 
- 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...
 

Data Fields

const HOOK_IS_LINE_REMOVABLE = "hook_is_line_removable"
 
const HOOK_IS_INPUT_DISABLED = "hook_is_disabled"
 
const HOOK_BEFORE_INPUT_RENDER = "hook_before_render"
 

Protected Attributes

array $cust_attr = array()
 
 $value
 
array $inputs = array()
 
array $input_options = array()
 
array $hooks = array()
 
array $line_values = array()
 
string $template_dir = ''
 
array $post_var_cache = array()
 
bool $show_label = false
 
bool $show_label_once = false
 
array $hidden_inputs = array()
 
bool $position_movable = false
 
int $counter = 0
 
bool $show_info = false
 
- 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
 

Private Member Functions

 createInputPostVar (string $iterator_id, \ilFormPropertyGUI $input)
 

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
 symbol ()
 
 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

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitMultiLineInputGUI::__construct ( string  $a_title = "",
string  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Definition at line 52 of file class.ilOrgUnitMultiLineInputGUI.php.

References ILIAS\MetaData\Repository\Validation\Data\__construct(), initCSSandJS(), setMulti(), and ilFormPropertyGUI\setType().

53  {
54  parent::__construct($a_title, $a_postvar);
55  $this->setType("line_select");
56  $this->setMulti(true);
57  $this->initCSSandJS();
58  }
setMulti(bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ addCustomAttribute()

ilOrgUnitMultiLineInputGUI::addCustomAttribute ( string  $key,
string  $value,
bool  $override = false 
)

Definition at line 190 of file class.ilOrgUnitMultiLineInputGUI.php.

References ILIAS\LTI\ToolProvider\$key, and $value.

Referenced by render().

190  : void
191  {
192  if (isset($this->cust_attr[$key]) && !$override) {
193  $this->cust_attr[$key] .= ' ' . $value;
194  } else {
195  $this->cust_attr[$key] = $value;
196  }
197  }
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the caller graph for this function:

◆ addHook()

ilOrgUnitMultiLineInputGUI::addHook ( string  $key,
array  $options 
)

Definition at line 69 of file class.ilOrgUnitMultiLineInputGUI.php.

References ILIAS\LTI\ToolProvider\$key.

69  : void
70  {
71  $this->hooks[$key] = $options;
72  }
string $key
Consumer key/client ID value.
Definition: System.php:193

◆ addInput()

ilOrgUnitMultiLineInputGUI::addInput ( \ilFormPropertyGUI  $input,
array  $options = array() 
)

Definition at line 81 of file class.ilOrgUnitMultiLineInputGUI.php.

References ilFormPropertyGUI\getPostVar().

81  : void
82  {
83  $this->inputs[$input->getPostVar()] = $input;
84  $this->input_options[$input->getPostVar()] = $options;
85  $this->counter++;
86  }
+ Here is the call graph for this function:

◆ checkInput()

ilOrgUnitMultiLineInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
bool Input ok, true/false

Definition at line 158 of file class.ilOrgUnitMultiLineInputGUI.php.

References ilFormPropertyGUI\$lng, $valid, ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), ilFormPropertyGUI\setAlert(), and ilUtil\stripSlashes().

158  : bool
159  {
160  global $lng;
161  $valid = true;
162  // escape data
163  $out_array = array();
164  foreach ($_POST[$this->getPostVar()] as $item_num => $item) {
165  foreach ($this->inputs as $input_key => $input) {
166  if (isset($item[$input_key])) {
167  $out_array[$item_num][$input_key] = (is_string($item[$input_key])) ? \ilUtil::stripSlashes($item[$input_key]) : $item[$input_key];
168  }
169  }
170  }
171  $_POST[$this->getPostVar()] = $out_array;
172  if ($this->getRequired() && !trim(implode("", $_POST[$this->getPostVar()]))) {
173  $valid = false;
174  }
175  // validate
176  foreach ($this->inputs as $input_key => $inputs) {
177  if (!$inputs->checkInput()) {
178  $valid = false;
179  }
180  }
181  if (!$valid) {
182  $this->setAlert($lng->txt("msg_input_is_required"));
183 
184  return false;
185  }
186 
187  return $valid;
188  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
$valid
+ Here is the call graph for this function:

◆ createInputPostVar()

ilOrgUnitMultiLineInputGUI::createInputPostVar ( string  $iterator_id,
\ilFormPropertyGUI  $input 
)
private

Definition at line 204 of file class.ilOrgUnitMultiLineInputGUI.php.

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

Referenced by render().

204  : string
205  {
206  if ($this->getMulti()) {
207  return $this->getPostVar() . '[' . $iterator_id . '][' . $input->getPostVar() . ']';
208  } else {
209  return $this->getPostVar() . '[' . $input->getPostVar() . ']';
210  }
211  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCustomAttributes()

ilOrgUnitMultiLineInputGUI::getCustomAttributes ( )

Definition at line 199 of file class.ilOrgUnitMultiLineInputGUI.php.

References $cust_attr.

Referenced by render().

199  : array
200  {
201  return (array) $this->cust_attr;
202  }
+ Here is the caller graph for this function:

◆ getHook()

ilOrgUnitMultiLineInputGUI::getHook ( string  $key)

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

References ILIAS\LTI\ToolProvider\$key.

Referenced by render().

60  : ?string
61  {
62  if (isset($this->hooks[$key])) {
63  return $this->hooks[$key];
64  }
65 
66  return false;
67  }
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the caller graph for this function:

◆ getInputs()

ilOrgUnitMultiLineInputGUI::getInputs ( )

Definition at line 108 of file class.ilOrgUnitMultiLineInputGUI.php.

References $inputs.

108  : array
109  {
110  return $this->inputs;
111  }

◆ getTableFilterHTML()

ilOrgUnitMultiLineInputGUI::getTableFilterHTML ( )

Get HTML for table filter.

Definition at line 373 of file class.ilOrgUnitMultiLineInputGUI.php.

References render().

374  {
375  return $this->render();
376  }
render(int $iterator_id=0, bool $clean_render=false)
+ Here is the call graph for this function:

◆ getTemplateDir()

ilOrgUnitMultiLineInputGUI::getTemplateDir ( )

Definition at line 88 of file class.ilOrgUnitMultiLineInputGUI.php.

References $template_dir.

88  : string
89  {
90  return $this->template_dir;
91  }

◆ getToolbarHTML()

ilOrgUnitMultiLineInputGUI::getToolbarHTML ( )

Get HTML for toolbar.

Definition at line 381 of file class.ilOrgUnitMultiLineInputGUI.php.

References render().

381  : string
382  {
383  return $this->render("toolbar");
384  }
render(int $iterator_id=0, bool $clean_render=false)
+ Here is the call graph for this function:

◆ getValue()

ilOrgUnitMultiLineInputGUI::getValue ( )

Definition at line 130 of file class.ilOrgUnitMultiLineInputGUI.php.

References ILIAS\LTI\ToolProvider\$key, and $out.

Referenced by render().

130  : array
131  {
132  $out = array();
133  foreach ($this->inputs as $key => $item) {
134  $out[$key] = $item->getValue();
135  }
136 
137  return $out;
138  }
$out
Definition: buildRTE.php:24
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the caller graph for this function:

◆ initCSSandJS()

ilOrgUnitMultiLineInputGUI::initCSSandJS ( )

Definition at line 339 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by __construct().

339  : void
340  {
341  global $tpl;
342  $tpl->addJavascript('./Modules/OrgUnit/templates/default/multi_line_input.js');
343  }
+ Here is the caller graph for this function:

◆ insert()

ilOrgUnitMultiLineInputGUI::insert ( ilTemplate  $a_tpl)

Definition at line 345 of file class.ilOrgUnitMultiLineInputGUI.php.

References $data, ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getMulti(), ilTemplate\parseCurrentBlock(), render(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

345  : int
346  {
347  $output = "";
348 
349  $output .= $this->render(0, true);
350  if ($this->getMulti() && is_array($this->line_values) && count($this->line_values) > 0) {
351  foreach ($this->line_values as $run => $data) {
352  $object = $this;
353  $object->setValue($data);
354  $output .= $object->render($run);
355  }
356  } else {
357  $output .= $this->render(0, true);
358  }
359  if ($this->getMulti()) {
360  $output = '<div id="' . $this->getFieldId() . '" class="multi_line_input">' . $output
361  . '</div>';
362  $output .= '<script type="text/javascript">$("#' . $this->getFieldId()
363  . '").multi_line_input(' . json_encode($this->input_options) . ')</script>';
364  }
365  $a_tpl->setCurrentBlock("prop_generic");
366  $a_tpl->setVariable("PROP_GENERIC", $output);
367  $a_tpl->parseCurrentBlock();
368  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:546
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
render(int $iterator_id=0, bool $clean_render=false)
+ Here is the call graph for this function:

◆ isPositionMovable()

ilOrgUnitMultiLineInputGUI::isPositionMovable ( )

Definition at line 386 of file class.ilOrgUnitMultiLineInputGUI.php.

References $position_movable.

Referenced by render().

386  : bool
387  {
389  }
+ Here is the caller graph for this function:

◆ isShowInfo()

ilOrgUnitMultiLineInputGUI::isShowInfo ( )

Definition at line 407 of file class.ilOrgUnitMultiLineInputGUI.php.

References $show_info.

Referenced by render().

407  : bool
408  {
409  return $this->show_info;
410  }
+ Here is the caller graph for this function:

◆ isShowLabel()

ilOrgUnitMultiLineInputGUI::isShowLabel ( )

Definition at line 98 of file class.ilOrgUnitMultiLineInputGUI.php.

References $show_label.

Referenced by render().

98  : bool
99  {
100  return $this->show_label;
101  }
+ Here is the caller graph for this function:

◆ isShowLabelOnce()

ilOrgUnitMultiLineInputGUI::isShowLabelOnce ( )

Definition at line 396 of file class.ilOrgUnitMultiLineInputGUI.php.

References $show_label_once.

Referenced by render().

396  : bool
397  {
398  return $this->show_label_once;
399  }
+ Here is the caller graph for this function:

◆ removeHook()

ilOrgUnitMultiLineInputGUI::removeHook ( string  $key)

Definition at line 74 of file class.ilOrgUnitMultiLineInputGUI.php.

74  : void
75  {
76  if (isset($this->hooks[$key])) {
77  unset($this->hooks[$key]);
78  }
79  }
string $key
Consumer key/client ID value.
Definition: System.php:193

◆ render()

ilOrgUnitMultiLineInputGUI::render ( int  $iterator_id = 0,
bool  $clean_render = false 
)
Exceptions
ilTemplateException
ilException

Definition at line 217 of file class.ilOrgUnitMultiLineInputGUI.php.

References $inputs, ILIAS\LTI\ToolProvider\$key, $value, addCustomAttribute(), createInputPostVar(), ILIAS\Repository\get(), getCustomAttributes(), ilFormPropertyGUI\getDisabled(), getHook(), ilFormPropertyGUI\getMulti(), getValue(), isPositionMovable(), isShowInfo(), isShowLabel(), isShowLabelOnce(), and ilLegacyFormElementsUtil\prepareFormOutput().

Referenced by getTableFilterHTML(), getToolbarHTML(), and insert().

217  : string
218  {
219  $first_label = true;
220  $tpl = new \ilTemplate(
221  "tpl.multi_line_input.html",
222  true,
223  true,
224  'Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting'
225  );
226  $class = 'multi_input_line';
227  $this->addCustomAttribute('class', $class, true);
228  foreach ($this->getCustomAttributes() as $key => $value) {
229  $tpl->setCurrentBlock('cust_attr');
230  $tpl->setVariable('CUSTOM_ATTR_KEY', $key);
231  $tpl->setVariable('CUSTOM_ATTR_VALUE', $value);
232  $tpl->parseCurrentBlock();
233  }
235  foreach ($inputs as $key => $input) {
236  $input = clone $input;
237  $is_hidden = false;
238  $is_ta = false;
239  if (!method_exists($input, 'render')) {
240  switch (true) {
241  case ($input instanceof \ilHiddenInputGUI):
242  $is_hidden = true;
243  break;
244  case ($input instanceof \ilTextAreaInputGUI):
245  $is_ta = true;
246  break;
247  default:
248  throw new \ilException("Method " . get_class($input)
249  . "::render() does not exists! You cannot use this input-type in ilMultiLineInputGUI");
250  }
251  }
252 
253  $is_disabled_hook = $this->getHook(self::HOOK_IS_INPUT_DISABLED);
254  if ($is_disabled_hook !== false && !$clean_render) {
255  $input->setDisabled($is_disabled_hook($this->getValue()));
256  }
257  if ($this->getDisabled()) {
258  $input->setDisabled(true);
259  }
260  if ($iterator_id == 0 && !isset($this->post_var_cache[$key])) {
261  $this->post_var_cache[$key] = $input->getPostVar();
262  } else {
263  // Reset post var
264  $input->setPostVar($this->post_var_cache[$key]);
265  }
266  $post_var = $this->createInputPostVar($iterator_id, $input);
267  $input->setPostVar($post_var);
268  $before_render_hook = $this->getHook(self::HOOK_BEFORE_INPUT_RENDER);
269  if ($before_render_hook !== false && !$clean_render) {
270  $input = $before_render_hook($this->getValue(), $key, $input);
271  }
272  switch (true) {
273  case $is_hidden:
274  $tpl->setCurrentBlock('hidden');
275  $tpl->setVariable('NAME', $post_var);
276  $tpl->setVariable('VALUE', ilLegacyFormElementsUtil::prepareFormOutput($input->getValue()));
277  break;
278  case $is_ta:
279  if ($this->isShowLabel() || ($this->isShowLabelOnce() && $first_label)) {
280  $tpl->setCurrentBlock('input_label');
281  $tpl->setVariable('LABEL', $input->getTitle());
282  $tpl->setVariable('CONTENT', $input->getHTML());
283  $tpl->parseCurrentBlock();
284  $first_label = false;
285  } else {
286  $tpl->setCurrentBlock('input');
287  $tpl->setVariable('CONTENT', $input->getHTML());
288  }
289  break;
290  default:
291  if ($this->isShowLabel() || ($this->isShowLabelOnce() && $first_label)) {
292  $tpl->setCurrentBlock('input_label');
293  $tpl->setVariable('LABEL', $input->getTitle());
294  $tpl->setVariable('CONTENT', $input->render());
295  $first_label = false;
296  } else {
297  $tpl->setCurrentBlock('input');
298  $tpl->setVariable('CONTENT', $input->render());
299  }
300  break;
301  }
302  if ($this->isShowInfo()) {
303  if ($this->isShowLabel()) {
304  $tpl->setCurrentBlock('input_info_label');
305  $tpl->setVariable('INFO_LABEL', $input->getInfo());
306  $tpl->parseCurrentBlock();
307  } else {
308  $tpl->setCurrentBlock('input_info');
309  $tpl->setVariable('INFO', $input->getInfo());
310  $tpl->parseCurrentBlock();
311  }
312  }
313  $tpl->parseCurrentBlock();
314  }
315  if ($this->getMulti() && !$this->getDisabled()) {
316  $image_plus = xlvoGlyphGUI::get('plus');
317  $show_remove = true;
318  $is_removeable_hook = $this->getHook(self::HOOK_IS_LINE_REMOVABLE);
319  if ($is_removeable_hook !== false && !$clean_render) {
320  $show_remove = $is_removeable_hook($this->getValue());
321  }
322  $show_remove = true;
323  $image_minus = ($show_remove) ? xlvoGlyphGUI::get('minus') : '<span class="glyphicon glyphicon-minus hide"></span>';
324  $tpl->setCurrentBlock('multi_icons');
325  $tpl->setVariable('IMAGE_PLUS', $image_plus);
326  $tpl->setVariable('IMAGE_MINUS', $image_minus);
327  $tpl->parseCurrentBlock();
328  if ($this->isPositionMovable()) {
329  $tpl->setCurrentBlock('multi_icons_move');
330  $tpl->setVariable('IMAGE_UP', xlvoGlyphGUI::get(xlvoGlyphGUI::UP));
331  $tpl->setVariable('IMAGE_DOWN', xlvoGlyphGUI::get(xlvoGlyphGUI::DOWN));
332  $tpl->parseCurrentBlock();
333  }
334  }
335 
336  return $tpl->get();
337  }
addCustomAttribute(string $key, string $value, bool $override=false)
static prepareFormOutput($a_str, bool $a_strip=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
createInputPostVar(string $iterator_id, \ilFormPropertyGUI $input)
string $key
Consumer key/client ID value.
Definition: System.php:193
get(string $key, Refinery\Transformation $t)
Get passed parameter, if not data passed, get key from http request.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMulti()

ilOrgUnitMultiLineInputGUI::setMulti ( bool  $a_multi,
bool  $a_sortable = false,
bool  $a_addremove = true 
)

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

Referenced by __construct().

113  : void
114  {
115  $this->multi = $a_multi;
116  }
+ Here is the caller graph for this function:

◆ setPositionMovable()

ilOrgUnitMultiLineInputGUI::setPositionMovable ( bool  $position_movable)

Definition at line 391 of file class.ilOrgUnitMultiLineInputGUI.php.

References $position_movable.

392  {
393  $this->position_movable = $position_movable;
394  }

◆ setShowInfo()

ilOrgUnitMultiLineInputGUI::setShowInfo ( bool  $show_info)

Definition at line 412 of file class.ilOrgUnitMultiLineInputGUI.php.

References $show_info.

412  : void
413  {
414  $this->show_info = $show_info;
415  }

◆ setShowLabel()

ilOrgUnitMultiLineInputGUI::setShowLabel ( bool  $show_label)

Definition at line 103 of file class.ilOrgUnitMultiLineInputGUI.php.

References $show_label.

Referenced by setShowLabelOnce().

104  {
105  $this->show_label = $show_label;
106  }
+ Here is the caller graph for this function:

◆ setShowLabelOnce()

ilOrgUnitMultiLineInputGUI::setShowLabelOnce ( bool  $show_label_once)

Definition at line 401 of file class.ilOrgUnitMultiLineInputGUI.php.

References $show_label_once, and setShowLabel().

401  : void
402  {
403  $this->setShowLabel(false);
404  $this->show_label_once = $show_label_once;
405  }
+ Here is the call graph for this function:

◆ setTemplateDir()

ilOrgUnitMultiLineInputGUI::setTemplateDir ( string  $template_dir)

Definition at line 93 of file class.ilOrgUnitMultiLineInputGUI.php.

References $template_dir.

93  : void
94  {
95  $this->template_dir = $template_dir;
96  }

◆ setValue()

ilOrgUnitMultiLineInputGUI::setValue ( string  $a_value)

Definition at line 118 of file class.ilOrgUnitMultiLineInputGUI.php.

References ILIAS\LTI\ToolProvider\$key, and IL_CAL_DATE.

Referenced by setValueByArray().

118  : void
119  {
120  foreach ($this->inputs as $key => $item) {
121  if (method_exists($item, 'setValue')) {
122  $item->setValue($a_value[$key]);
123  } elseif ($item instanceof \ilDateTimeInputGUI) {
124  $item->setDate(new \ilDate($a_value[$key]['date'], IL_CAL_DATE));
125  }
126  }
127  $this->value = $a_value;
128  }
This class represents a date/time property in a property form.
string $key
Consumer key/client ID value.
Definition: System.php:193
const IL_CAL_DATE
+ Here is the caller graph for this function:

◆ setValueByArray()

ilOrgUnitMultiLineInputGUI::setValueByArray ( array  $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 144 of file class.ilOrgUnitMultiLineInputGUI.php.

References $data, ilFormPropertyGUI\getMulti(), ilFormPropertyGUI\getPostVar(), and setValue().

144  : void
145  {
146  $data = $a_values[$this->getPostVar()];
147  if ($this->getMulti()) {
148  $this->line_values = $data;
149  } else {
150  $this->setValue($data);
151  }
152  }
+ Here is the call graph for this function:

Field Documentation

◆ $counter

int ilOrgUnitMultiLineInputGUI::$counter = 0
protected

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

◆ $cust_attr

array ilOrgUnitMultiLineInputGUI::$cust_attr = array()
protected

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

Referenced by getCustomAttributes().

◆ $hidden_inputs

array ilOrgUnitMultiLineInputGUI::$hidden_inputs = array()
protected

Definition at line 42 of file class.ilOrgUnitMultiLineInputGUI.php.

◆ $hooks

array ilOrgUnitMultiLineInputGUI::$hooks = array()
protected

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

◆ $input_options

array ilOrgUnitMultiLineInputGUI::$input_options = array()
protected

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

◆ $inputs

array ilOrgUnitMultiLineInputGUI::$inputs = array()
protected

Definition at line 33 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by getInputs(), and render().

◆ $line_values

array ilOrgUnitMultiLineInputGUI::$line_values = array()
protected

Definition at line 37 of file class.ilOrgUnitMultiLineInputGUI.php.

◆ $position_movable

bool ilOrgUnitMultiLineInputGUI::$position_movable = false
protected

Definition at line 43 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by isPositionMovable(), and setPositionMovable().

◆ $post_var_cache

array ilOrgUnitMultiLineInputGUI::$post_var_cache = array()
protected

Definition at line 39 of file class.ilOrgUnitMultiLineInputGUI.php.

◆ $show_info

bool ilOrgUnitMultiLineInputGUI::$show_info = false
protected

Definition at line 45 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by isShowInfo(), and setShowInfo().

◆ $show_label

bool ilOrgUnitMultiLineInputGUI::$show_label = false
protected

Definition at line 40 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by isShowLabel(), and setShowLabel().

◆ $show_label_once

bool ilOrgUnitMultiLineInputGUI::$show_label_once = false
protected

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

Referenced by isShowLabelOnce(), and setShowLabelOnce().

◆ $template_dir

string ilOrgUnitMultiLineInputGUI::$template_dir = ''
protected

Definition at line 38 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by getTemplateDir(), and setTemplateDir().

◆ $value

ilOrgUnitMultiLineInputGUI::$value
protected

Definition at line 32 of file class.ilOrgUnitMultiLineInputGUI.php.

Referenced by addCustomAttribute(), and render().

◆ HOOK_BEFORE_INPUT_RENDER

const ilOrgUnitMultiLineInputGUI::HOOK_BEFORE_INPUT_RENDER = "hook_before_render"

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

◆ HOOK_IS_INPUT_DISABLED

const ilOrgUnitMultiLineInputGUI::HOOK_IS_INPUT_DISABLED = "hook_is_disabled"

Definition at line 29 of file class.ilOrgUnitMultiLineInputGUI.php.

◆ HOOK_IS_LINE_REMOVABLE

const ilOrgUnitMultiLineInputGUI::HOOK_IS_LINE_REMOVABLE = "hook_is_line_removable"

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


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