ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilAdvancedMDFieldDefinitionSelect.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php";
5
15{
16 protected $options = [];
17 protected $confirm_objects = [];
19 protected $confirmed_objects; // [array]
20
21 protected $option_translations = [];
22
23 const REMOVE_ACTION_ID = "-iladvmdrm-";
24
25
26 //
27 // generic types
28 //
29
30 public function getType()
31 {
32 return self::TYPE_SELECT;
33 }
34
35 // search
36 public function getSearchQueryParserValue(ilADTSearchBridge $search_bridge)
37 {
38 return $search_bridge->getADT()->getSelection();
39 }
40
41
42
43 //
44 // ADT
45 //
46
47 protected function initADTDefinition()
48 {
49 $def = ilADTFactory::getInstance()->getDefinitionInstanceByType("Enum");
50 $def->setNumeric(false);
51
52 $options = $this->getOptions();
53 $translated_options = [];
54 if (isset($this->getOptionTranslations()[$this->language])) {
55 $translated_options = $this->getOptionTranslations()[$this->language];
56 }
57 $def->setOptions(array_replace($options, $translated_options));
58 return $def;
59 }
60
61
62 //
63 // properties
64 //
65
71 public function setOptions(array $a_values = null)
72 {
73 if ($a_values !== null) {
74 foreach ($a_values as $idx => $value) {
75 $a_values[$idx] = trim($value);
76 if (!$a_values[$idx]) {
77 unset($a_values[$idx]);
78 }
79 }
80 $a_values = array_unique($a_values);
81 // sort($a_values);
82 }
83 $this->options = $a_values;
84 }
85
91 public function getOptions()
92 {
93 return $this->options;
94 }
95
96 public function getOptionTranslations()
97 {
99 }
100
104 public function getOptionTranslation(string $language)
105 {
106 if (isset($this->getOptionTranslations()[$language])) {
107 return $this->getOptionTranslations()[$language];
108 }
109 return [];
110 }
111
115 public function setOptionTranslations(array $translations)
116 {
117 $this->option_translations = $translations;
118 }
119
124 public function setOptionTranslationsForLanguage(array $translations, string $language)
125 {
126 $this->option_translations[$language] = $translations;
127 }
128
132 protected function importFieldDefinition(array $a_def)
133 {
134 // options (field_values from adv_mdf_field_definitions are not used)
135 $this->setOptions([]);
136 }
137
141 protected function getFieldDefinition()
142 {
143 return [];
144 }
145
146 public function getFieldDefinitionForTableGUI(string $content_language)
147 {
148 global $DIC;
149
150 $lng = $DIC['lng'];
151
152 if (strlen($content_language)) {
153 $options = $this->getOptionTranslation($content_language);
154 } else {
155 $options = $this->getOptions();
156 }
157 return [
158 $lng->txt("meta_advmd_select_options") => implode(",", $options)
159 ];
160 }
161
169 protected function addCustomFieldToDefinitionForm(ilPropertyFormGUI $a_form, $a_disabled = false, string $language = '')
170 {
171 global $DIC;
172
173 $lng = $DIC['lng'];
174
175 if (!$this->useDefaultLanguageMode($language)) {
176 return $this->addCustomFieldToDefinitionFormInTranslationMode($a_form, $a_disabled, $language);
177 }
178
179 // if not the default language is chosen => no add/remove; no sorting
180 $field = new ilTextInputGUI($lng->txt("meta_advmd_select_options"), "opts");
181 $field->setRequired(true);
182 $field->setMulti(true, true);
183 $field->setMaxLength(255); // :TODO:
184 $a_form->addItem($field);
185
186 $options = $this->getOptions();
187 if ($options) {
188 $field->setMultiValues($options);
189 $field->setValue(array_shift($options));
190 }
191
192 if ($a_disabled) {
193 $field->setDisabled(true);
194 }
195 }
196
202 protected function addCustomFieldToDefinitionFormInTranslationMode(ilPropertyFormGUI $form, bool $disabled, string $language = '')
203 {
204 global $DIC;
205
206 $lng = $DIC->language();
207
208 $default_language = ilAdvancedMDRecord::_getInstanceByRecordId($this->record_id)->getDefaultLanguage();
209
210 $translation = $this->getOptionTranslation($language);
211
212 $first = true;
213 foreach ($this->getOptions() as $index => $option) {
214 $title = '';
215 if ($first) {
216 $title = $lng->txt("meta_advmd_select_options");
217 }
218 $text = new ilTextInputGUI($title, 'opts__' . $language . '__' . (string) $index);
219 if (isset($translation[$index])) {
220 $text->setValue($translation[$index]);
221 };
222 $text->setInfo($default_language . ': ' . $option);
223 $text->setMaxLength(255);
224 $text->setRequired(true);
225
226 $first = false;
227 $form->addItem($text);
228 }
229 }
230
236 protected function buildConfirmedObjects(ilPropertyFormGUI $a_form)
237 {
238 // #15719
239 $recipes = $a_form->getInput("conf_det");
240 if (is_array($recipes[$this->getFieldId()])) {
241 $recipes = $recipes[$this->getFieldId()];
242 $sum = $a_form->getInput("conf_det_act");
243 $sum = $sum[$this->getFieldId()];
244 $sgl = $a_form->getInput("conf");
245 $sgl = $sgl[$this->getFieldId()];
246
247 $res = array();
248 foreach ($recipes as $old_option => $recipe) {
249 $sum_act = $sum[$old_option];
250 $sgl_act = $sgl[$old_option];
251
252 if ($recipe == "sum") {
253 // #18885
254 if (!$sum_act) {
255 return;
256 }
257
258 foreach (array_keys($sgl_act) as $obj_idx) {
259 if ($sum_act == self::REMOVE_ACTION_ID) {
260 $sum_act = "";
261 }
262 if (substr($sum_act, 0, 4) == 'idx_') {
263 $parts = explode('_', $sum_act);
264 $sum_act = $parts[1];
265 }
266 $res[$old_option][$obj_idx] = $sum_act;
267 }
268 } else {
269 // #18885
270 foreach ($sgl_act as $sgl_index => $sgl_item) {
271 if (!$sgl_item) {
272 return;
273 } elseif ($sgl_item == self::REMOVE_ACTION_ID) {
274 $sgl_act[$sgl_index] = "";
275 }
276 if (substr($sgl_item, 0, 4) == 'idx_') {
277 $parts = explode('_', $sgl_item);
278 $sgl_act[$sgl_index] = $parts[1];
279 }
280 }
281
282 $res[$old_option] = $sgl_act;
283 }
284 }
285 return $res;
286 }
287 }
288
295 {
296 $this->importNewSelectOptions(true, $a_form, $language);
297 }
298
299 protected function importNewSelectOptions(
300 bool $multi,
301 ilPropertyFormGUI $a_form,
302 string $language = ''
303 ) : void {
306 return;
307 }
308
309 if (!strlen($language)) {
310 $language = ilAdvancedMDRecord::_getInstanceByRecordId($this->getRecordId())->getDefaultLanguage();
311 }
312
313 $old = $this->getOptionTranslation($language);
314 $new = $a_form->getInput("opts");
315
316 $missing = array_diff_assoc($old, $new);
317 // keep track of the indices of entries persisting through the operation
318 $index_map = [];
319 foreach ($missing as $missing_idx => $missing_value) {
320 if (in_array($missing_value, $new)) {
321 $index_map[$missing_idx] = array_search($missing_value, $new);
322 }
323 }
324
325 if (sizeof($missing)) {
326 $this->confirmed_objects = $this->buildConfirmedObjects($a_form);
327 $already_confirmed = is_array($this->confirmed_objects);
328
329 $search = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($this->getADTDefinition(), false, $multi);
330 foreach ($missing as $missing_idx => $missing_value) {
331 $in_use = $this->findBySingleValue($search, $missing_idx);
332 if (is_array($in_use)) {
333 foreach ($in_use as $item) {
334 if (array_key_exists($missing_idx, $index_map)) {
335 $complete_id = $item[0] . "_" . $item[1] . "_" . $item[2];
336 $new_index = $index_map[$missing_idx];
337 $this->confirmed_objects[$missing_idx][$complete_id] = $new_index;
338 continue;
339 }
340 if (!$already_confirmed) {
341 $this->confirm_objects[$missing_idx][] = $item;
342 $this->confirm_objects_values[$missing_idx] = $old[$missing_idx];
343 }
344 }
345 }
346 }
347 }
348 $this->old_options = $old;
349
350 // update the options along with their translations
352 foreach ($this->getOptionTranslations() as $current_lang => $options) {
353 $current_lang = (string) $current_lang;
354 if ($current_lang === $language) {
355 continue;
356 }
357 $updated_translations = [];
358 foreach ($options as $idx => $option) {
359 if (array_key_exists($idx, $index_map)) {
360 $updated_translations[$index_map[$idx]] = $option;
361 continue;
362 }
363 $updated_translations[$idx] = $option;
364 }
365 $this->setOptionTranslationsForLanguage($updated_translations, $current_lang);
366 }
367 }
368
369 protected function findBySingleValue(ilADTEnumSearchBridgeMulti $a_search, $a_value)
370 {
371 $res = array();
372 $a_search->getADT()->setSelections((array) $a_value);
373 $condition = $a_search->getSQLCondition('value_index');
374
376 "adv_md_values",
377 "Enum",
378 $this->getFieldId(),
379 $condition
380 );
381 if ($in_use) {
382 foreach ($in_use as $item) {
383 $res[] = array($item["obj_id"], $item["sub_type"], $item["sub_id"], $item["value_index"]);
384 }
385 }
386
387 return $res;
388 }
389
390
395 protected function importTranslatedFormPostValues(ilPropertyFormGUI $form, string $language)
396 {
397 $translated_options = [];
398 foreach ($this->getOptions() as $idx => $value) {
399 $value = $form->getInput('opts__' . $language . '__' . (string) $idx);
400 $translated_options[] = trim($value);
401 }
402 $translations = $this->getOptionTranslations();
403 $translations[$language] = $translated_options;
404 $this->setOptionTranslations($translations);
405 }
406
408 {
409 return is_array($this->confirm_objects) && count($this->confirm_objects) > 0;
410 }
411
413 {
414 global $DIC;
415
416 $lng = $DIC['lng'];
417 $objDefinition = $DIC['objDefinition'];
418
419 $a_form->getItemByPostVar("opts")->setDisabled(true);
420 if (is_array($this->confirm_objects) && count($this->confirm_objects) > 0) {
421 $new_options = $a_form->getInput("opts");
422
423 $sec = new ilFormSectionHeaderGUI();
424 $sec->setTitle($lng->txt("md_adv_confirm_definition_select_section"));
425 $a_form->addItem($sec);
426
427 foreach ($this->confirm_objects as $old_option => $items) {
428 $old_option_value = $this->confirm_objects_values[$old_option];
429 $details = new ilRadioGroupInputGUI($lng->txt("md_adv_confirm_definition_select_option") . ': "' . $old_option_value . '"', "conf_det[" . $this->getFieldId() . "][" . $old_option . "]");
430 $details->setRequired(true);
431 $details->setValue("sum");
432 $a_form->addItem($details);
433
434 // automatic reload does not work
435 if (isset($_POST["conf_det"][$this->getFieldId()][$old_option])) {
436 $details->setValue($_POST["conf_det"][$this->getFieldId()][$old_option]);
437 }
438
439 $sum = new ilRadioOption($lng->txt("md_adv_confirm_definition_select_option_all"), "sum");
440 $details->addOption($sum);
441
442 $sel = new ilSelectInputGUI(
443 $lng->txt("md_adv_confirm_definition_select_option_all_action"),
444 "conf_det_act[" . $this->getFieldId() . "][" . $old_option . "]"
445 );
446 $sel->setRequired(true);
447 $options = array(
448 "" => $lng->txt("please_select"),
449 self::REMOVE_ACTION_ID => $lng->txt("md_adv_confirm_definition_select_option_remove")
450 );
451 foreach ($new_options as $new_option_index => $new_option) {
452 $options['idx_' . $new_option_index] = $lng->txt("md_adv_confirm_definition_select_option_overwrite") . ': "' . $new_option . '"';
453 }
454 $sel->setOptions($options);
455 $sum->addSubItem($sel);
456
457 // automatic reload does not work
458 if (isset($_POST["conf_det_act"][$this->getFieldId()][$old_option])) {
459 if ($_POST["conf_det_act"][$this->getFieldId()][$old_option]) {
460 $sel->setValue($_POST["conf_det_act"][$this->getFieldId()][$old_option]);
461 } elseif ($_POST["conf_det"][$this->getFieldId()][$old_option] == "sum") {
462 $sel->setAlert($lng->txt("msg_input_is_required"));
463 ilUtil::sendFailure($lng->txt("form_input_not_valid"));
464 }
465 }
466 $single = new ilRadioOption($lng->txt("md_adv_confirm_definition_select_option_single"), "sgl");
467 $details->addOption($single);
468 foreach ($items as $item) {
469 $obj_id = $item[0];
470 $sub_type = $item[1];
471 $sub_id = $item[2];
472
473 $item_id = $obj_id . "_" . $sub_type . "_" . $sub_id;
474
475 $type = ilObject::_lookupType($obj_id);
476 $type_title = $lng->txt("obj_" . $type);
477 $title = ' "' . ilObject::_lookupTitle($obj_id) . '"';
478
479 if ($sub_id) {
480 $class = "ilObj" . $objDefinition->getClassName($type);
481 $class_path = $objDefinition->getLocation($type);
482 include_once $class_path . "/class." . $class . ".php";
483 $ints = class_implements($class);
484 if (isset($ints["ilAdvancedMetaDataSubItems"])) {
485 $sub_title = $class::getAdvMDSubItemTitle($obj_id, $sub_type, $sub_id);
486 if ($sub_title) {
487 $title .= ' (' . $sub_title . ')';
488 }
489 }
490 }
491
492 $sel = new ilSelectInputGUI(
493 $type_title . ' ' . $title,
494 "conf[" . $this->getFieldId() . "][" . $old_option . "][" . $item_id . "]"
495 );
496 $sel->setRequired(true);
497 $options = array(
498 "" => $lng->txt("please_select"),
499 self::REMOVE_ACTION_ID => $lng->txt("md_adv_confirm_definition_select_option_remove")
500 );
501 foreach ($new_options as $new_option_index => $new_option) {
502 $options['idx_' . $new_option_index] = $lng->txt("md_adv_confirm_definition_select_option_overwrite") . ': "' . $new_option . '"';
503 }
504 $sel->setOptions($options);
505
506 // automatic reload does not work
507 if (isset($_POST["conf"][$this->getFieldId()][$old_option][$item_id])) {
508 if ($_POST["conf"][$this->getFieldId()][$old_option][$item_id]) {
509 $sel->setValue($_POST["conf"][$this->getFieldId()][$old_option][$item_id]);
510 } elseif ($_POST["conf_det"][$this->getFieldId()][$old_option] == "sgl") {
511 $sel->setAlert($lng->txt("msg_input_is_required"));
512 ilUtil::sendFailure($lng->txt("form_input_not_valid"));
513 }
514 }
515
516 $single->addSubItem($sel);
517 }
518 }
519 }
520 }
521
522 public function delete()
523 {
524 $this->deleteOptionTranslations();
525 parent::delete();
526 }
527
528 public function save($a_keep_pos = false)
529 {
530 parent::save($a_keep_pos);
531 $this->saveOptionTranslations();
532 }
533
537 protected function deleteOptionTranslations()
538 {
539 global $DIC;
540
541 $db = $DIC->database();
542 $query = 'delete from adv_mdf_enum ' .
543 'where field_id = ' . $db->quote($this->getFieldId(), ilDBConstants::T_INTEGER);
544 $db->manipulate($query);
545 }
546
547 protected function updateOptionTranslations()
548 {
549 $this->deleteOptionTranslations();
550 $this->saveOptionTranslations();
551 }
552
553 protected function saveOptionTranslations()
554 {
555 global $DIC;
556
557 $db = $DIC->database();
558
559 foreach ($this->getOptionTranslations() as $lang_key => $options) {
560 foreach ($options as $idx => $option) {
561 $query = 'insert into adv_mdf_enum (field_id, lang_code, idx, value )' .
562 'values ( ' .
563 $db->quote($this->getFieldId(), ilDBConstants::T_INTEGER) . ', ' .
564 $db->quote($lang_key, ilDBConstants::T_TEXT) . ', ' .
565 $db->quote($idx, ilDBConstants::T_INTEGER) . ', ' .
566 $db->quote($option, ilDBConstants::T_TEXT) .
567 ')' ;
568 $db->manipulate($query);
569 }
570 }
571 }
572
573
574 //
575 // definition CRUD
576 //
577
578 public function update()
579 {
580 if (is_array($this->confirmed_objects) && count($this->confirmed_objects) > 0) {
581 // we need the "old" options for the search
582 $def = $this->getADTDefinition();
583 $def = clone($def);
584 $def->setOptions($this->old_options);
585 $search = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($def, false, true);
587
588 $page_list_mappings = [];
589
590 foreach ($this->confirmed_objects as $old_option => $item_ids) {
591 // get complete old values
592 $old_values = array();
593 foreach ($this->findBySingleValue($search, $old_option) as $item) {
594 $old_values[$item[0] . "_" . $item[1] . "_" . $item[2]] = $item[3];
595 }
596
597
598 foreach ($item_ids as $item => $new_option) {
599 $parts = explode("_", $item);
600 $obj_id = $parts[0];
601 $sub_type = $parts[1];
602 $sub_id = $parts[2];
603
604 // update existing value (with changed option)
605 if (isset($old_values[$item])) {
606 $old_value = $old_values[$item];
607 // find changed option in old value
608 //$old_value = explode(ilADTMultiEnumDBBridge::SEPARATOR, $old_values[$item]);
609 // remove separators
610 //array_shift($old_value);
611 //array_pop($old_value);
612
613
614 //$old_idx = array_keys($old_value, $old_option);
615 $old_idx = $old_value;
616 if (isset($old_idx)) {
617 $primary = array(
618 "obj_id" => array("integer", $obj_id),
619 "sub_type" => array("text", $sub_type),
620 "sub_id" => array("integer", $sub_id),
621 "field_id" => array("integer", $this->getFieldId())
622 );
623
624 $index_old = array_merge(
625 $primary,
626 [
627 'value_index' => [ilDBConstants::T_INTEGER, $old_idx]
628 ]
629 );
630 $index_new = array_merge(
631 $primary,
632 [
633 'value_index' => [ilDBConstants::T_INTEGER, $new_option]
634 ]
635 );
636 ilADTActiveRecordByType::deleteByPrimary('adv_md_values', $index_old, 'MultiEnum');
637
638 if (is_numeric($new_option)) {
639 ilADTActiveRecordByType::deleteByPrimary('adv_md_values', $index_new, 'MultiEnum');
640 ilADTActiveRecordByType::create('adv_md_values', $index_new, 'MultiEnum');
641 } else {
642 }
643 }
644 }
645
646 if ($sub_type == "wpg") {
647 // #15763 - adapt advmd page lists
648 $page_list_mappings[(string) $old_option] = (string) $new_option;
649 }
650 }
651 }
652
653 if (!empty($page_list_mappings)) {
655 $this->getFieldId(),
656 $page_list_mappings
657 );
658 }
659
660 $this->confirmed_objects = array();
661 }
662
663 parent::update();
664 $this->updateOptionTranslations();
665 }
666
667
668 //
669 // export
670 //
671
672 protected function addPropertiesToXML(ilXmlWriter $a_writer)
673 {
674 foreach ($this->getOptions() as $value) {
675 $a_writer->xmlElement('FieldValue', null, $value);
676 }
677 foreach ($this->getOptionTranslations() as $lang_key => $translations) {
678 foreach ((array) $translations as $value) {
679 $a_writer->xmlElement('FieldValue', ['id' => $lang_key], $value);
680 }
681 }
682 }
683
688 public function importXMLProperty($a_key, $a_value)
689 {
690 if (!$a_key) {
691 $this->options[] = $a_value;
692 } else {
693 $this->option_translations[$a_key][] = $a_value;
694 }
695 }
696
697
698 //
699 // import/export
700 //
701
702 public function getValueForXML(ilADT $element)
703 {
704 return $element->getSelection();
705 }
706
707 public function importValueFromXML($a_cdata)
708 {
709 $this->getADT()->setSelection($a_cdata);
710 }
711
712
713 //
714 // presentation
715 //
716
718 {
719 assert($a_enum instanceof ilADTEnumFormBridge);
720
721 $a_enum->setAutoSort(false);
722 }
723
724 protected function import(array $db_data)
725 {
726 global $DIC;
727
728 parent::import($db_data);
729
730 $db = $DIC->database();
731 $query = 'select * from adv_mdf_enum ' .
732 'where field_id = ' . $db->quote($this->getFieldId(), ilDBConstants::T_INTEGER) . ' ' .
733 'order by idx';
734 $res = $db->query($query);
735 $options = [];
736 $default = [];
737 $record = ilAdvancedMDRecord::_getInstanceByRecordId($this->getRecordId());
738 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
739 if ($row->lang_code == $record->getDefaultLanguage()) {
740 $default[$row->idx] = $row->value;
741 }
742 $options[$row->lang_code][$row->idx] = $row->value;
743 }
744 $this->setOptions($default);
745 $this->setOptionTranslations($options);
746 }
747
752 public function _clone($a_new_record_id)
753 {
754 global $DIC;
755
756 $db = $DIC->database();
757
758 $obj = parent::_clone($a_new_record_id);
759 $query = 'select * from adv_mdf_enum ' .
760 'where field_id = ' . $db->quote($this->getFieldId(), ilDBConstants::T_INTEGER) . ' ' .
761 'order by idx';
762 $res = $db->query($query);
763 $options = [];
764 $default = [];
765 $record = ilAdvancedMDRecord::_getInstanceByRecordId($this->getRecordId());
766 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
767 if ($row->lang_code == $record->getDefaultLanguage()) {
768 $default[$row->idx] = $row->value;
769 }
770 $options[$row->lang_code][$row->idx] = $row->value;
771 }
772 $obj->setOptions($default);
773 $obj->setOptionTranslations($options);
774 $obj->update();
775 return $obj;
776 }
777}
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
static deleteByPrimary($a_table, array $a_primary, $a_type=null)
Delete values by (partial) primary key.
static find($a_table, $a_type, $a_field_id, $a_condition, $a_additional_fields=null)
Find entries.
static create(string $table, array $fields, string $type)
getSQLCondition($a_element_id)
Get SQL condition for current value(s)
static getInstance()
Get singleton.
static initActiveRecordByType()
Init active record by type.
ADT form bridge base class.
ADT search bridge base class.
ADT base class.
Definition: class.ilADT.php:12
importTranslatedFormPostValues(ilPropertyFormGUI $form, string $language)
addCustomFieldToDefinitionForm(ilPropertyFormGUI $a_form, $a_disabled=false, string $language='')
Add input elements to definition form.
addCustomFieldToDefinitionFormInTranslationMode(ilPropertyFormGUI $form, bool $disabled, string $language='')
prepareElementForEditor(ilADTFormBridge $a_enum)
Prepare editor form elements.
importCustomDefinitionFormPostValues(ilPropertyFormGUI $a_form, string $language='')
Import custom post values from definition form.
getSearchQueryParserValue(ilADTSearchBridge $search_bridge)
Get value for search query parser.
importNewSelectOptions(bool $multi, ilPropertyFormGUI $a_form, string $language='')
getFieldDefinitionForTableGUI(string $content_language)
Parse properties for table gui.
getValueForXML(ilADT $element)
Parse ADT value for xml (export)
findBySingleValue(ilADTEnumSearchBridgeMulti $a_search, $a_value)
save($a_keep_pos=false)
Create new field entry.
setOptionTranslationsForLanguage(array $translations, string $language)
buildConfirmedObjects(ilPropertyFormGUI $a_form)
Process custom post values from definition form.
addPropertiesToXML(ilXmlWriter $a_writer)
Add (type-specific) properties to xml export.
useDefaultLanguageMode(string $language)
Check if default language mode has to be used: no language given or language equals default language.
getADTDefinition()
Get ADT definition instance.
static _getInstanceByRecordId($a_record_id)
Get instance by record id.
This class represents a section header in a property form.
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
static migrateField(int $a_field_id, array $mapping)
Migrate search/filter values on advmd change.
This class represents a property form user interface.
addItem($a_item)
Add Item (Property, SectionHeader).
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
getItemByPostVar($a_post_var)
Get Item by POST variable.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.
This class represents a text property in a property form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
XML writer class.
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
global $DIC
Definition: goto.php:24
language()
Definition: language.php:2
$index
Definition: metadata.php:128
$query
$type
$lng
foreach($_POST as $key=> $value) $res