ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilOrgUnitGenericMultiInputGUI Class Reference

Class ilDclGenericMultiInputGUI. More...

+ Inheritance diagram for ilOrgUnitGenericMultiInputGUI:
+ Collaboration diagram for ilOrgUnitGenericMultiInputGUI:

Public Member Functions

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

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 Member Functions

 createInputPostVar ($iterator_id, \ilFormPropertyGUI $input)
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Protected Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitGenericMultiInputGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Definition at line 82 of file class.ilOrgUnitGenericMultiInputGUI.php.

References initCSSandJS(), setMulti(), and ilFormPropertyGUI\setType().

83  {
84  parent::__construct($a_title, $a_postvar);
85  $this->setType("line_select");
86  $this->setMulti(true);
87  $this->initCSSandJS();
88  }
setMulti($a_multi, $a_sortable=false, $a_addremove=true)
setType($a_type)
Set Type.
+ Here is the call graph for this function:

Member Function Documentation

◆ addCustomAttribute()

ilOrgUnitGenericMultiInputGUI::addCustomAttribute (   $key,
  $value,
  $override = false 
)
Parameters
$key
$value
bool | false$override

Definition at line 297 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $key, and $value.

Referenced by render().

298  {
299  if (isset($this->cust_attr[$key]) && !$override) {
300  $this->cust_attr[$key] .= ' ' . $value;
301  } else {
302  $this->cust_attr[$key] = $value;
303  }
304  }
$key
Definition: croninfo.php:18
+ Here is the caller graph for this function:

◆ addHook()

ilOrgUnitGenericMultiInputGUI::addHook (   $key,
  $options 
)
Parameters
array$options

Definition at line 107 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $key, and PHPMailer\PHPMailer\$options.

108  {
109  $this->hooks[$key] = $options;
110  }
$key
Definition: croninfo.php:18

◆ addInput()

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

Definition at line 134 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $input, PHPMailer\PHPMailer\$options, and ilFormPropertyGUI\getPostVar().

135  {
136  $this->inputs[$input->getPostVar()] = $input;
137  $this->input_options[$input->getPostVar()] = $options;
138  $this->counter++;
139  }
+ Here is the call graph for this function:

◆ checkInput()

ilOrgUnitGenericMultiInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Definition at line 253 of file class.ilOrgUnitGenericMultiInputGUI.php.

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

254  {
255  global $lng;
256  $valid = true;
257  // escape data
258  $out_array = array();
259  if (is_array($_POST[$this->getPostVar()])) {
260  foreach ($_POST[$this->getPostVar()] as $item_num => $item) {
261  foreach ($this->inputs as $input_key => $input) {
262  if (isset($item[$input_key])) {
263  $out_array[$item_num][$input_key] = (is_string($item[$input_key])) ? \ilUtil::stripSlashes($item[$input_key]) : $item[$input_key];
264  }
265  }
266  }
267  }
268  $_POST[$this->getPostVar()] = $out_array;
269  if ($this->getRequired() && !trim(implode("", $_POST[$this->getPostVar()]))) {
270  $valid = false;
271  }
272  // validate
273 
274  foreach ($this->inputs as $input_key => $inputs) {
275  foreach ($out_array as $subitem) {
276  $_POST[$inputs->getPostVar()] = $subitem[$inputs->getPostVar()];
277  if (!$inputs->checkInput()) {
278  $valid = false;
279  }
280  }
281  }
282  if (!$valid) {
283  $this->setAlert($lng->txt("msg_input_is_required"));
284 
285  return false;
286  }
287 
288  return $valid;
289  }
getPostVar()
Get Post Variable.
$valid
setAlert($a_alert)
Set Alert Text.
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:

◆ createInputPostVar()

ilOrgUnitGenericMultiInputGUI::createInputPostVar (   $iterator_id,
\ilFormPropertyGUI  $input 
)
protected
Parameters
$iterator_id
\ilFormPropertyGUI$input
Returns
string

Definition at line 322 of file class.ilOrgUnitGenericMultiInputGUI.php.

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

Referenced by render().

323  {
324  if ($this->getMulti()) {
325  return $this->getPostVar() . '[' . $iterator_id . '][' . $input->getPostVar() . ']';
326  } else {
327  return $this->getPostVar() . '[' . $input->getPostVar() . ']';
328  }
329  }
getPostVar()
Get Post Variable.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCustomAttributes()

ilOrgUnitGenericMultiInputGUI::getCustomAttributes ( )
Returns
array

Definition at line 310 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $cust_attr.

Referenced by render().

+ Here is the caller graph for this function:

◆ getHook()

ilOrgUnitGenericMultiInputGUI::getHook (   $key)
Returns
string

Definition at line 94 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $key.

Referenced by render().

95  {
96  if (isset($this->hooks[$key])) {
97  return $this->hooks[$key];
98  }
99 
100  return false;
101  }
$key
Definition: croninfo.php:18
+ Here is the caller graph for this function:

◆ getInputs()

ilOrgUnitGenericMultiInputGUI::getInputs ( )

Get Options.

Returns
array Options. Array ("value" => "option_text")

Definition at line 183 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $inputs.

◆ getTableFilterHTML()

ilOrgUnitGenericMultiInputGUI::getTableFilterHTML ( )

Get HTML for table filter.

Definition at line 516 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $html, and render().

517  {
518  $html = $this->render();
519 
520  return $html;
521  }
render($iterator_id=0, $clean_render=false)
Render item.
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

◆ getTemplateDir()

ilOrgUnitGenericMultiInputGUI::getTemplateDir ( )
Returns
mixed

Definition at line 145 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $template_dir.

◆ getToolbarHTML()

ilOrgUnitGenericMultiInputGUI::getToolbarHTML ( )

Get HTML for toolbar.

Definition at line 527 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $html, and render().

528  {
529  $html = $this->render("toolbar");
530 
531  return $html;
532  }
render($iterator_id=0, $clean_render=false)
Render item.
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

◆ getValue()

ilOrgUnitGenericMultiInputGUI::getValue ( )

Get Value.

Returns
string Value

Definition at line 221 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $key, and $out.

Referenced by render().

222  {
223  $out = array();
224  foreach ($this->inputs as $key => $item) {
225  $out[$key] = $item->getValue();
226  }
227 
228  return $out;
229  }
$key
Definition: croninfo.php:18
+ Here is the caller graph for this function:

◆ initCSSandJS()

ilOrgUnitGenericMultiInputGUI::initCSSandJS ( )

Definition at line 460 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $tpl.

Referenced by __construct().

461  {
462  global $tpl;
463  $tpl->addJavascript('Modules/OrgUnit/js/generic_multi_line_input.js');
464  }
$tpl
Definition: ilias.php:10
+ Here is the caller graph for this function:

◆ insert()

ilOrgUnitGenericMultiInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

Definition at line 472 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $data, PHPMailer\PHPMailer\$options, Sabre\VObject\$output, $tpl, ilGlyphGUI\ADD, ilGlyphGUI\get(), ilFormPropertyGUI\getMulti(), and render().

473  {
474  $output = "";
475 
476  $output .= $this->render(0, true);
477  if ($this->getMulti() && is_array($this->line_values) && count($this->line_values) > 0) {
478  foreach ($this->line_values as $run => $data) {
479  $object = $this;
480  $object->setValue($data);
481  $output .= $object->render($run);
482  }
483  } else {
484  if ($this->render_one_for_empty_value) {
485  $output .= $this->render(0, true);
486  } else {
487  $tpl = new ilTemplate("tpl.prop_generic_multi_line.html", true, true, 'Modules/OrgUnit');
488  $image_plus = ilGlyphGUI::get(ilGlyphGUI::ADD);
489  $image_minus = '<span class="glyphicon glyphicon-minus hide"></span>';
490 
491  $tpl->setVariable('ADDITIONAL_ATTRS', "style='float:left';");
492  $tpl->setCurrentBlock('multi_icons');
493  $tpl->setVariable('IMAGE_PLUS', $image_plus);
494  $tpl->setVariable('IMAGE_MINUS', $image_minus);
495  $tpl->parseCurrentBlock();
496  $output .= $tpl->get();
497  }
498  }
499  if ($this->getMulti()) {
500  $output = "<div id='{$this->getFieldId()}' class='multi_line_input'>{$output}</div>";
501 
502  global $tpl;
503  $options = json_encode($this->input_options);
504  $tpl->addOnLoadCode("$('#{$this->getFieldId()}').multi_line_input({$this->getFieldId()}, '{$options}')");
505  }
506 
507  $a_tpl->setCurrentBlock("prop_generic");
508  $a_tpl->setVariable("PROP_GENERIC", $output);
509  $a_tpl->parseCurrentBlock();
510  }
$tpl
Definition: ilias.php:10
render($iterator_id=0, $clean_render=false)
Render item.
static get($a_glyph, $a_text="")
Get glyph html.
special template class to simplify handling of ITX/PEAR
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ isPositionMovable()

ilOrgUnitGenericMultiInputGUI::isPositionMovable ( )
Returns
boolean

Definition at line 538 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $position_movable.

Referenced by render().

+ Here is the caller graph for this function:

◆ isRenderOneForEmptyValue()

ilOrgUnitGenericMultiInputGUI::isRenderOneForEmptyValue ( )

◆ isShowInfo()

ilOrgUnitGenericMultiInputGUI::isShowInfo ( )
Returns
boolean

Definition at line 575 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $show_info.

Referenced by render().

+ Here is the caller graph for this function:

◆ isShowLabel()

ilOrgUnitGenericMultiInputGUI::isShowLabel ( )
Returns
boolean

Definition at line 163 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $show_label.

Referenced by render().

+ Here is the caller graph for this function:

◆ isShowLabelOnce()

ilOrgUnitGenericMultiInputGUI::isShowLabelOnce ( )
Returns
boolean

Definition at line 556 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $show_label_once.

Referenced by render().

+ Here is the caller graph for this function:

◆ removeHook()

ilOrgUnitGenericMultiInputGUI::removeHook (   $key)
Parameters
$key
Returns
bool

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

References $key.

119  {
120  if (isset($this->hooks[$key])) {
121  unset($this->hooks[$key]);
122 
123  return true;
124  }
125 
126  return false;
127  }
$key
Definition: croninfo.php:18

◆ render()

ilOrgUnitGenericMultiInputGUI::render (   $iterator_id = 0,
  $clean_render = false 
)

Render item.

Parameters
int$iterator_id
Returns
string
Exceptions

Definition at line 340 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $input, $inputs, $key, $tpl, $value, ilGlyphGUI\ADD, addCustomAttribute(), createInputPostVar(), ilGlyphGUI\DOWN, ilGlyphGUI\get(), getCustomAttributes(), ilFormPropertyGUI\getDisabled(), getHook(), ilFormPropertyGUI\getMulti(), getValue(), isPositionMovable(), isShowInfo(), isShowLabel(), isShowLabelOnce(), ilUtil\prepareFormOutput(), ilGlyphGUI\REMOVE, and ilGlyphGUI\UP.

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

341  {
342  $first_label = true;
343  // $tpl = new \ilTemplate("tpl.multi_line_input.html", true, true, 'Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting');
344  $tpl = new ilTemplate("tpl.prop_generic_multi_line.html", true, true, 'Modules/OrgUnit');
345 
346  $class = 'multi_input_line';
347  $this->addCustomAttribute('class', $class, true);
348  foreach ($this->getCustomAttributes() as $key => $value) {
349  $tpl->setCurrentBlock('cust_attr');
350  $tpl->setVariable('CUSTOM_ATTR_KEY', $key);
351  $tpl->setVariable('CUSTOM_ATTR_VALUE', $value);
352  $tpl->parseCurrentBlock();
353  }
355  foreach ($inputs as $key => $input) {
356  $input = clone $input;
357  $is_hidden = false;
358  $is_ta = false;
359  if (!method_exists($input, 'render')) {
360  switch (true) {
361  case ($input instanceof \ilHiddenInputGUI):
362  $is_hidden = true;
363  break;
364  case ($input instanceof \ilTextAreaInputGUI):
365  $is_ta = true;
366  break;
367  default:
368  throw new \ilException("Method " . get_class($input)
369  . "::render() does not exists! You cannot use this input-type in ilMultiLineInputGUI");
370  }
371  }
372 
373  $is_disabled_hook = $this->getHook(self::HOOK_IS_INPUT_DISABLED);
374  if ($is_disabled_hook !== false && !$clean_render) {
375  $input->setDisabled($is_disabled_hook($this->getValue()));
376  }
377  if ($this->getDisabled()) {
378  $input->setDisabled(true);
379  }
380  if ($iterator_id == 0 && !isset($this->post_var_cache[$key])) {
381  $this->post_var_cache[$key] = $input->getPostVar();
382  } else {
383  // Reset post var
384  $input->setPostVar($this->post_var_cache[$key]);
385  }
386  $post_var = $this->createInputPostVar($iterator_id, $input);
387  $input->setPostVar($post_var);
388  $before_render_hook = $this->getHook(self::HOOK_BEFORE_INPUT_RENDER);
389  if ($before_render_hook !== false && !$clean_render) {
390  $input = $before_render_hook($this->getValue(), $key, $input);
391  }
392  switch (true) {
393  case $is_hidden:
394  $tpl->setCurrentBlock('hidden');
395  $tpl->setVariable('NAME', $post_var);
396  $tpl->setVariable('VALUE', \ilUtil::prepareFormOutput($input->getValue()));
397  break;
398  case $is_ta:
399  if ($this->isShowLabel() || ($this->isShowLabelOnce() && $first_label)) {
400  $tpl->setCurrentBlock('input_label');
401  $tpl->setVariable('LABEL', $input->getTitle());
402  $tpl->setVariable('CONTENT', $input->getHTML());
403  $tpl->parseCurrentBlock();
404  $first_label = false;
405  } else {
406  $tpl->setCurrentBlock('input');
407  $tpl->setVariable('CONTENT', $input->getHTML());
408  }
409  break;
410  default:
411  if ($this->isShowLabel() || ($this->isShowLabelOnce() && $first_label)) {
412  $tpl->setCurrentBlock('input_label');
413  $tpl->setVariable('LABEL', $input->getTitle());
414  $tpl->setVariable('CONTENT', $input->render());
415  $first_label = false;
416  } else {
417  $tpl->setCurrentBlock('input');
418  $tpl->setVariable('CONTENT', $input->render());
419  }
420  break;
421  }
422  if ($this->isShowInfo()) {
423  if ($this->isShowLabel()) {
424  $tpl->setCurrentBlock('input_info_label');
425  $tpl->setVariable('INFO_LABEL', $input->getInfo());
426  $tpl->parseCurrentBlock();
427  } else {
428  $tpl->setCurrentBlock('input_info');
429  $tpl->setVariable('INFO', $input->getInfo());
430  $tpl->parseCurrentBlock();
431  }
432  }
433  $tpl->parseCurrentBlock();
434  }
435  if ($this->getMulti() && !$this->getDisabled()) {
436  $image_plus = ilGlyphGUI::get(ilGlyphGUI::ADD);
437  $show_remove = true;
438  $is_removeable_hook = $this->getHook(self::HOOK_IS_LINE_REMOVABLE);
439  if ($is_removeable_hook !== false && !$clean_render) {
440  $show_remove = $is_removeable_hook($this->getValue());
441  }
442  $show_remove = true;
443  $image_minus = ($show_remove) ? ilGlyphGUI::get(ilGlyphGUI::REMOVE) : '<span class="glyphicon glyphicon-minus hide"></span>';
444  $tpl->setCurrentBlock('multi_icons');
445  $tpl->setVariable('IMAGE_PLUS', $image_plus);
446  $tpl->setVariable('IMAGE_MINUS', $image_minus);
447  $tpl->parseCurrentBlock();
448  if ($this->isPositionMovable()) {
449  $tpl->setCurrentBlock('multi_icons_move');
450  $tpl->setVariable('IMAGE_UP', ilGlyphGUI::get(ilGlyphGUI::UP));
451  $tpl->setVariable('IMAGE_DOWN', ilGlyphGUI::get(ilGlyphGUI::DOWN));
452  $tpl->parseCurrentBlock();
453  }
454  }
455 
456  return $tpl->get();
457  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$tpl
Definition: ilias.php:10
static get($a_glyph, $a_text="")
Get glyph html.
This class represents a hidden form property in a property form.
special template class to simplify handling of ITX/PEAR
createInputPostVar($iterator_id, \ilFormPropertyGUI $input)
This class represents a text area property in a property form.
$key
Definition: croninfo.php:18
addCustomAttribute($key, $value, $override=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMulti()

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

Definition at line 192 of file class.ilOrgUnitGenericMultiInputGUI.php.

Referenced by __construct().

193  {
194  $this->multi = $a_multi;
195  }
+ Here is the caller graph for this function:

◆ setPositionMovable()

ilOrgUnitGenericMultiInputGUI::setPositionMovable (   $position_movable)
Parameters
boolean$position_movable

Definition at line 547 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $position_movable.

548  {
549  $this->position_movable = $position_movable;
550  }

◆ setRenderOneForEmptyValue()

ilOrgUnitGenericMultiInputGUI::setRenderOneForEmptyValue (   $render_one_for_empty_value)
Parameters
bool$render_one_for_empty_value

Definition at line 602 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $render_one_for_empty_value.

603  {
604  $this->render_one_for_empty_value = $render_one_for_empty_value;
605  }

◆ setShowInfo()

ilOrgUnitGenericMultiInputGUI::setShowInfo (   $show_info)
Parameters
boolean$show_info

Definition at line 584 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $show_info.

585  {
586  $this->show_info = $show_info;
587  }

◆ setShowLabel()

ilOrgUnitGenericMultiInputGUI::setShowLabel (   $show_label)
Parameters
boolean$show_label

Definition at line 172 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $show_label.

Referenced by setShowLabelOnce().

173  {
174  $this->show_label = $show_label;
175  }
+ Here is the caller graph for this function:

◆ setShowLabelOnce()

ilOrgUnitGenericMultiInputGUI::setShowLabelOnce (   $show_label_once)
Parameters
boolean$show_label_once

Definition at line 565 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $show_label_once, and setShowLabel().

566  {
567  $this->setShowLabel(false);
568  $this->show_label_once = $show_label_once;
569  }
+ Here is the call graph for this function:

◆ setTemplateDir()

ilOrgUnitGenericMultiInputGUI::setTemplateDir (   $template_dir)
Parameters
mixed$template_dir

Definition at line 154 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $template_dir.

155  {
156  $this->template_dir = $template_dir;
157  }

◆ setValue()

ilOrgUnitGenericMultiInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Definition at line 203 of file class.ilOrgUnitGenericMultiInputGUI.php.

References $key, and IL_CAL_DATE.

Referenced by setValueByArray().

204  {
205  foreach ($this->inputs as $key => $item) {
206  if (method_exists($item, 'setValue')) {
207  $item->setValue($a_value[$key]);
208  } elseif ($item instanceof \ilDateTimeInputGUI) {
209  $item->setDate(new \ilDate($a_value[$key]['date'], IL_CAL_DATE));
210  }
211  }
212  $this->value = $a_value;
213  }
This class represents a date/time property in a property form.
Class for single dates.
const IL_CAL_DATE
$key
Definition: croninfo.php:18
+ Here is the caller graph for this function:

◆ setValueByArray()

ilOrgUnitGenericMultiInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 237 of file class.ilOrgUnitGenericMultiInputGUI.php.

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

238  {
239  $data = $a_values[$this->getPostVar()];
240  if ($this->getMulti()) {
241  $this->line_values = $data;
242  } else {
243  $this->setValue($data);
244  }
245  }
getPostVar()
Get Post Variable.
$data
Definition: bench.php:6
+ Here is the call graph for this function:

Field Documentation

◆ $counter

ilOrgUnitGenericMultiInputGUI::$counter = 0
protected

Definition at line 66 of file class.ilOrgUnitGenericMultiInputGUI.php.

◆ $cust_attr

ilOrgUnitGenericMultiInputGUI::$cust_attr = array()
protected

Definition at line 18 of file class.ilOrgUnitGenericMultiInputGUI.php.

Referenced by getCustomAttributes().

◆ $hidden_inputs

ilOrgUnitGenericMultiInputGUI::$hidden_inputs = array()
protected

Definition at line 58 of file class.ilOrgUnitGenericMultiInputGUI.php.

◆ $hooks

ilOrgUnitGenericMultiInputGUI::$hooks = array()
protected

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

◆ $input_options

ilOrgUnitGenericMultiInputGUI::$input_options = array()
protected

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

◆ $inputs

ilOrgUnitGenericMultiInputGUI::$inputs = array()
protected

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

Referenced by checkInput(), getInputs(), and render().

◆ $line_values

ilOrgUnitGenericMultiInputGUI::$line_values = array()
protected

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

◆ $position_movable

ilOrgUnitGenericMultiInputGUI::$position_movable = false
protected

◆ $post_var_cache

ilOrgUnitGenericMultiInputGUI::$post_var_cache = array()
protected

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

◆ $render_one_for_empty_value

ilOrgUnitGenericMultiInputGUI::$render_one_for_empty_value = true
protected

◆ $show_info

ilOrgUnitGenericMultiInputGUI::$show_info = false
protected

Definition at line 70 of file class.ilOrgUnitGenericMultiInputGUI.php.

Referenced by isShowInfo(), and setShowInfo().

◆ $show_label

ilOrgUnitGenericMultiInputGUI::$show_label = false
protected

Definition at line 50 of file class.ilOrgUnitGenericMultiInputGUI.php.

Referenced by isShowLabel(), and setShowLabel().

◆ $show_label_once

ilOrgUnitGenericMultiInputGUI::$show_label_once = false
protected

Definition at line 54 of file class.ilOrgUnitGenericMultiInputGUI.php.

Referenced by isShowLabelOnce(), and setShowLabelOnce().

◆ $template_dir

ilOrgUnitGenericMultiInputGUI::$template_dir = ''
protected

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

Referenced by getTemplateDir(), and setTemplateDir().

◆ $value

ilOrgUnitGenericMultiInputGUI::$value
protected

Definition at line 22 of file class.ilOrgUnitGenericMultiInputGUI.php.

Referenced by addCustomAttribute(), and render().

◆ HOOK_BEFORE_INPUT_RENDER

const ilOrgUnitGenericMultiInputGUI::HOOK_BEFORE_INPUT_RENDER = "hook_before_render"

Definition at line 14 of file class.ilOrgUnitGenericMultiInputGUI.php.

◆ HOOK_IS_INPUT_DISABLED

const ilOrgUnitGenericMultiInputGUI::HOOK_IS_INPUT_DISABLED = "hook_is_disabled"

Definition at line 13 of file class.ilOrgUnitGenericMultiInputGUI.php.

◆ HOOK_IS_LINE_REMOVABLE

const ilOrgUnitGenericMultiInputGUI::HOOK_IS_LINE_REMOVABLE = "hook_is_line_removable"

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


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