ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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

Reimplemented from ilFormPropertyGUI.

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

84 {
85 parent::__construct($a_title, $a_postvar);
86 $this->setType("line_select");
87 $this->setMulti(true);
88 $this->initCSSandJS();
89 }
setType($a_type)
Set Type.
setMulti($a_multi, $a_sortable=false, $a_addremove=true)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), initCSSandJS(), setMulti(), and ilFormPropertyGUI\setType().

+ 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 298 of file class.ilOrgUnitGenericMultiInputGUI.php.

299 {
300 if (isset($this->cust_attr[$key]) && !$override) {
301 $this->cust_attr[$key] .= ' ' . $value;
302 } else {
303 $this->cust_attr[$key] = $value;
304 }
305 }

References $value.

Referenced by render().

+ Here is the caller graph for this function:

◆ addHook()

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

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

109 {
110 $this->hooks[$key] = $options;
111 }

◆ addInput()

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

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

136 {
137 $this->inputs[$input->getPostVar()] = $input;
138 $this->input_options[$input->getPostVar()] = $options;
139 $this->counter++;
140 }

References ilFormPropertyGUI\getPostVar().

+ 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

Reimplemented from ilFormPropertyGUI.

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

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

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

+ 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 323 of file class.ilOrgUnitGenericMultiInputGUI.php.

324 {
325 if ($this->getMulti()) {
326 return $this->getPostVar() . '[' . $iterator_id . '][' . $input->getPostVar() . ']';
327 } else {
328 return $this->getPostVar() . '[' . $input->getPostVar() . ']';
329 }
330 }

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

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCustomAttributes()

ilOrgUnitGenericMultiInputGUI::getCustomAttributes ( )
Returns
array

Definition at line 311 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 95 of file class.ilOrgUnitGenericMultiInputGUI.php.

96 {
97 if (isset($this->hooks[$key])) {
98 return $this->hooks[$key];
99 }
100
101 return false;
102 }

Referenced by render().

+ Here is the caller graph for this function:

◆ getInputs()

ilOrgUnitGenericMultiInputGUI::getInputs ( )

Get Options.

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

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

185 {
186 return $this->inputs;
187 }

References $inputs.

◆ getTableFilterHTML()

ilOrgUnitGenericMultiInputGUI::getTableFilterHTML ( )

Get HTML for table filter.

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

518 {
519 $html = $this->render();
520
521 return $html;
522 }
render($iterator_id=0, $clean_render=false)
Render item.

References render().

+ Here is the call graph for this function:

◆ getTemplateDir()

ilOrgUnitGenericMultiInputGUI::getTemplateDir ( )
Returns
mixed

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

References $template_dir.

◆ getToolbarHTML()

ilOrgUnitGenericMultiInputGUI::getToolbarHTML ( )

Get HTML for toolbar.

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

529 {
530 $html = $this->render("toolbar");
531
532 return $html;
533 }

References render().

+ Here is the call graph for this function:

◆ getValue()

ilOrgUnitGenericMultiInputGUI::getValue ( )

Get Value.

Returns
string Value

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

223 {
224 $out = array();
225 foreach ($this->inputs as $key => $item) {
226 $out[$key] = $item->getValue();
227 }
228
229 return $out;
230 }

References $out.

Referenced by render().

+ Here is the caller graph for this function:

◆ initCSSandJS()

ilOrgUnitGenericMultiInputGUI::initCSSandJS ( )

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

462 {
463 global $tpl;
464 $tpl->addJavascript('Modules/OrgUnit/js/generic_multi_line_input.js');
465 }
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl

References $tpl.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ insert()

ilOrgUnitGenericMultiInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

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

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

References $data, $tpl, ilGlyphGUI\ADD, ilGlyphGUI\get(), ilFormPropertyGUI\getMulti(), and render().

+ Here is the call graph for this function:

◆ isPositionMovable()

ilOrgUnitGenericMultiInputGUI::isPositionMovable ( )
Returns
boolean

Definition at line 539 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 576 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 164 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 557 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 119 of file class.ilOrgUnitGenericMultiInputGUI.php.

120 {
121 if (isset($this->hooks[$key])) {
122 unset($this->hooks[$key]);
123
124 return true;
125 }
126
127 return false;
128 }

◆ render()

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

Render item.

Parameters
int$iterator_id
Returns
string
Exceptions

ilException

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

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

References $inputs, $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().

+ 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

Reimplemented from ilFormPropertyGUI.

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

194 {
195 $this->multi = $a_multi;
196 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setPositionMovable()

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

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

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

References $position_movable.

◆ setRenderOneForEmptyValue()

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

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

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

References $render_one_for_empty_value.

◆ setShowInfo()

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

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

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

References $show_info.

◆ setShowLabel()

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

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

174 {
175 $this->show_label = $show_label;
176 }

References $show_label.

Referenced by setShowLabelOnce().

+ Here is the caller graph for this function:

◆ setShowLabelOnce()

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

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

567 {
568 $this->setShowLabel(false);
569 $this->show_label_once = $show_label_once;
570 }

References $show_label_once, and setShowLabel().

+ Here is the call graph for this function:

◆ setTemplateDir()

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

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

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

References $template_dir.

◆ setValue()

ilOrgUnitGenericMultiInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

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

References IL_CAL_DATE.

Referenced by setValueByArray().

+ 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 238 of file class.ilOrgUnitGenericMultiInputGUI.php.

239 {
240 $data = $a_values[$this->getPostVar()];
241 if ($this->getMulti()) {
242 $this->line_values = $data;
243 } else {
244 $this->setValue($data);
245 }
246 }

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

+ 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: