19declare(strict_types=1);
25use Psr\Http\Message\RequestInterface;
81 public function __construct(
int $a_context,
int $a_ref_id, ?
string $a_obj_type =
null, $a_sub_type =
null)
85 $this->
ctrl = $DIC->ctrl();
86 $this->
lng = $DIC->language();
87 $this->
lng->loadLanguageModule(
'meta');
88 $this->tpl =
$DIC->ui()->mainTemplate();
89 $this->tabs_gui =
$DIC->tabs();
92 $this->
toolbar = $DIC->toolbar();
93 $this->ui_factory =
$DIC->ui()->factory();
94 $this->ui_renderer =
$DIC->ui()->renderer();
95 $this->request =
$DIC->http()->request();
96 $this->
http = $DIC->http();
97 $this->db =
$DIC->database();
98 $this->
user = $DIC->user();
99 $this->
access = $DIC->access();
102 $this->
logger = $DIC->logger()->amet();
104 $this->context = $a_context;
118 if ($this->
http->wrapper()->query()->has(
'record_id')) {
119 return $this->
http->wrapper()->query()->retrieve(
129 if ($this->
http->wrapper()->post()->has(
'record_id')) {
130 return SplFixedArray::fromArray(
131 $this->
http->wrapper()->post()->retrieve(
133 $this->refinery->kindlyTo()->listOf(
134 $this->refinery->kindlyTo()->int()
139 return new SplFixedArray(0);
144 if ($this->
http->wrapper()->query()->has(
'field_id')) {
145 return $this->
http->wrapper()->query()->retrieve(
155 if ($this->
http->wrapper()->post()->has(
'field_id')) {
156 return SplFixedArray::fromArray(
157 $this->
http->wrapper()->post()->retrieve(
159 $this->refinery->kindlyTo()->listOf(
160 $this->refinery->kindlyTo()->int()
165 return new SplFixedArray(0);
170 if ($this->
http->wrapper()->post()->has(
'file_id')) {
171 return SplFixedArray::fromArray(
172 $this->
http->wrapper()->post()->retrieve(
174 $this->refinery->kindlyTo()->dictOf(
175 $this->refinery->kindlyTo()->string()
180 return new SplFixedArray(0);
185 if ($this->
http->wrapper()->query()->has(
'ftype')) {
186 return $this->
http->wrapper()->query()->retrieve(
196 if ($this->
http->wrapper()->post()->has(
'ftype')) {
197 return $this->
http->wrapper()->post()->retrieve(
207 if ($this->
http->wrapper()->query()->has(
'oid')) {
208 return $this->
http->wrapper()->query()->retrieve(
210 $this->
refinery->kindlyTo()->string()
221 if ($this->
http->wrapper()->post()->has(
'position')) {
222 return $this->
http->wrapper()->post()->retrieve(
224 $this->
refinery->kindlyTo()->dictOf(
225 $this->refinery->byTrying([
226 $this->refinery->kindlyTo()->float(),
227 $this->refinery->always(0)
254 $this->obj_id =
null;
255 $this->obj_type =
null;
256 $this->sub_type =
null;
267 $next_class = $this->
ctrl->getNextClass($this);
268 $cmd = $this->
ctrl->getCmd();
269 switch ($next_class) {
270 case strtolower(ilAdvancedMDRecordTranslationGUI::class):
271 $record = $this->initRecordObject();
272 $this->setRecordSubTabs(1,
true);
273 $int_gui = new \ilAdvancedMDRecordTranslationGUI($record);
274 $this->
ctrl->forwardCommand($int_gui);
277 case "ilpropertyformgui":
278 $this->initRecordObject();
280 $this->record->getRecordId() > 0 ?
'edit' :
'create'
287 $cmd =
'showRecords';
295 $this->setSubTabs($this->context);
297 $perm = $this->getPermissions()->hasPermissions(
307 $button = $this->ui_factory->button()->standard(
308 $this->
lng->txt(
'add'),
309 $this->ctrl->getLinkTargetByClass(strtolower(self::class),
"createRecord")
311 $this->
toolbar->addComponent($button);
314 $this->
toolbar->addSeparator();
319 $button = $this->ui_factory->button()->standard(
320 $this->
lng->txt(
'import'),
321 $this->ctrl->getLinkTargetByClass(strtolower(self::class),
"importRecords")
323 $this->
toolbar->addComponent($button);
326 $obj_type_context = ($this->obj_id > 0)
332 $this->getPermissions(),
335 $table_gui->setTitle($this->
lng->txt(
"md_record_list_table"));
336 $table_gui->setData($this->getParsedRecordObjects());
340 $table_gui->addMultiCommand(
"exportRecords", $this->
lng->txt(
'export'));
341 $table_gui->setSelectAllCheckbox(
"record_id");
343 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
344 $table_gui->addMultiCommand(
"confirmDeleteRecords", $this->
lng->txt(
"delete"));
345 $table_gui->addCommandButton(
"updateRecords", $this->
lng->txt(
"save"));
348 $this->tpl->setContent($table_gui->getHTML());
353 $this->setSubTabs($this->context);
354 $form = $this->initFormSubstitutions();
356 $this->tabs_gui->setSubTabActive(
'md_adv_presentation');
357 $this->tpl->setContent($this->
form->getHTML());
360 $this->showRecords();
369 if (!$this->
access->checkAccess(
'write',
'', $this->ref_id)) {
370 $this->
ctrl->redirect($this,
"showPresentation");
373 $form = $this->initFormSubstitutions();
375 $this->
ctrl->redirect($this,
'showPresentation');
378 if (!$form->checkInput()) {
379 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'),
true);
380 $this->
ctrl->redirect($this,
"showPresentation");
387 foreach ($visible_records as $obj_type => $record) {
389 $sub->enableDescription((
bool) $form->getInput(
'enabled_desc_' . $obj_type));
390 $sub->enableFieldNames((
bool) $form->getInput(
'enabled_field_names_' . $obj_type));
393 $definitions = $sub->sortDefinitions($definitions);
398 foreach ($definitions as $def) {
399 $field_id = $def->getFieldId();
400 $old_sub[$field_id] = array(
401 "active" => $sub->isSubstituted($field_id),
403 "bold" => $sub->isBold($field_id),
404 "newline" => $sub->hasNewline($field_id)
408 $sub->resetSubstitutions();
411 foreach ($definitions as $def) {
412 $field_id = $def->getFieldId();
413 $old = $old_sub[$field_id];
415 $active = (bool) $form->getInput(
'show_' . $obj_type .
'_' . $field_id);
418 $new_sub[$field_id] = $old;
419 $new_sub[$field_id][
'pos'] = (
int) $form->getInput(
'position_' . $obj_type .
'_' . $field_id);
420 $new_sub[$field_id][
'bold'] = (bool) $form->getInput(
'bold_' . $obj_type .
'_' . $field_id);
421 $new_sub[$field_id][
'newline'] = (bool) $form->getInput(
'newline_' . $obj_type .
'_' . $field_id);
425 if (
sizeof($new_sub)) {
427 foreach ($new_sub as $field_id => $field) {
428 $sub->appendSubstitution($field_id, (
bool) $field[
"bold"], (
bool) $field[
"newline"]);
434 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
435 $this->
ctrl->redirect($this,
"showPresentation");
444 $record_ids = $this->getRecordIdsFromPost();
445 if (!count($record_ids)) {
446 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
447 $this->showRecords();
453 foreach ($record_ids as $record_id) {
454 if (!$this->getPermissions()->hasPermission(
460 $fail[] = $record->getTitle();
464 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_perm_copy') .
" " . implode(
", ", $fail),
true);
465 $this->
ctrl->redirect($this,
"showRecords");
469 $xml_writer->write();
472 $this->
user->getId(),
473 $this->context === self::CONTEXT_ADMINISTRATION ?
null :
new ObjectId($this->obj_id)
475 $export_files->create($xml_writer->xmlDumpMem(
false));
477 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'md_adv_records_exported'));
486 $this->setSubTabs($this->context);
487 $this->tabs_gui->setSubTabActive(
'md_adv_file_list');
490 $this->
user->getId(),
491 $this->context === self::CONTEXT_ADMINISTRATION ?
null :
new ObjectId($this->obj_id)
493 $file_data = $files->readFilesInfo();
496 $table_gui->setTitle($this->
lng->txt(
"md_record_export_table"));
497 $table_gui->parseFiles($file_data);
498 $table_gui->addMultiCommand(
"downloadFile", $this->
lng->txt(
'download'));
500 if (
$GLOBALS[
'DIC']->
access()->checkAccess(
'write',
'', $this->ref_id)) {
501 $table_gui->addMultiCommand(
"confirmDeleteFiles", $this->
lng->txt(
"delete"));
503 $table_gui->setSelectAllCheckbox(
"file_id");
505 $this->tpl->setContent($table_gui->getHTML());
515 $file_ids = $this->getFileIdsFromPost();
516 if (count($file_ids) !== 1) {
517 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'md_adv_select_one_file'));
522 $this->
user->getId(),
523 $this->context === self::CONTEXT_ADMINISTRATION ?
null :
new ObjectId($this->obj_id)
525 $files->download($file_ids[0],
'ilias_meta_data_record.xml');
534 $file_ids = $this->getFileIdsFromPost();
535 if (count($file_ids) !== 1) {
536 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
542 $c_gui->setFormAction($this->
ctrl->getFormAction($this,
"deleteFiles"));
543 $c_gui->setHeaderText($this->
lng->txt(
"md_adv_delete_files_sure"));
544 $c_gui->setCancel($this->
lng->txt(
"cancel"),
"showFiles");
545 $c_gui->setConfirm($this->
lng->txt(
"confirm"),
"deleteFiles");
548 $this->
user->getId(),
549 $this->context === self::CONTEXT_ADMINISTRATION ?
null :
new ObjectId($this->obj_id)
551 $file_data = $files->readFilesInfo();
554 foreach ($file_ids as $file_id) {
555 $info = $file_data[$file_id];
559 is_array(
$info[
'name'] ??
false) ? implode(
',',
$info[
'name']) :
'No Records'
562 $this->tpl->setContent($c_gui->getHTML());
572 $file_ids = $this->getFileIdsFromPost();
573 if (count($file_ids) === 0) {
574 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
579 if (!
$GLOBALS[
'DIC']->
access()->checkAccess(
'write',
'', $this->ref_id)) {
580 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
581 $GLOBALS[
'DIC']->ctrl()->redirect($this,
'showFiles');
585 $this->
user->getId(),
586 $this->context === self::CONTEXT_ADMINISTRATION ?
null :
new ObjectId($this->obj_id)
588 foreach ($file_ids as $file_id) {
589 $files->deleteByFileId(
590 $this->
user->getId(),
594 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'md_adv_deleted_files'));
604 $this->initRecordObject();
605 $this->setRecordSubTabs();
607 $record_ids = $this->getRecordIdsFromPost();
608 if (!count($record_ids)) {
609 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
610 $this->showRecords();
617 $c_gui->setFormAction($this->
ctrl->getFormAction($this,
"deleteRecords"));
618 $c_gui->setHeaderText($this->
lng->txt(
"md_adv_delete_record_sure"));
619 $c_gui->setCancel($this->
lng->txt(
"cancel"),
"showRecords");
620 $c_gui->setConfirm($this->
lng->txt(
"confirm"),
"deleteRecords");
623 foreach ($record_ids as $record_id) {
625 $c_gui->addItem(
"record_id[]", (
string) $record_id, $record->getTitle() ?:
'No Title');
627 $this->tpl->setContent($c_gui->getHTML());
636 $record_ids = $this->getRecordIdsFromPost();
637 if (!count($record_ids)) {
638 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
639 $this->showRecords();
645 foreach ($record_ids as $record_id) {
647 if ($this->context == self::CONTEXT_OBJECT) {
649 if (!$record->getParentObject()) {
650 $fail[] = $record->getTitle();
654 if (!$this->getPermissions()->hasPermission(
660 $fail[] = $record->getTitle();
664 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_perm_delete') .
" " . implode(
", ", $fail),
true);
665 $this->
ctrl->redirect($this,
"showRecords");
668 foreach ($record_ids as $record_id) {
672 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'md_adv_deleted_records'),
true);
673 $this->
ctrl->redirect($this,
"showRecords");
684 $positions = $this->getPositionsFromPost();
685 $records = $this->getParsedRecordObjects();
687 $all_positions = $positions;
688 foreach ($records as $record) {
689 if (!array_key_exists($record[
'id'], $all_positions)) {
690 $all_positions[$record[
'id']] = $record[
'position'];
693 asort($all_positions, SORT_NUMERIC);
695 $sorted_positions = [];
697 foreach ($all_positions as $record_id => $pos) {
698 $sorted_positions[(
int) $record_id] = $i++;
700 $selected_global = [];
702 $post_active = (array) ($this->
http->request()->getParsedBody()[
'active'] ?? []);
703 if ($this->obj_id > 0) {
706 foreach ($records as $item) {
708 $is_on_page = array_key_exists($item[
'id'], $positions);
710 $perm = $this->getPermissions()->hasPermissions(
728 $obj_types = array();
729 $post_object_types = (array) ($this->
http->request()->getParsedBody()[
'obj_types'] ?? []);
730 if (is_array($post_object_types[$record_obj->getRecordId()] ??
false)) {
731 foreach ($post_object_types[$record_obj->getRecordId()] as $type => $status) {
733 $type = explode(
":", $type);
734 $obj_types[] = array(
737 "optional" => ((
int) $status == 2)
744 if (!$item[
'readonly']) {
746 $record_obj->setAssignedObjectTypes($obj_types);
748 foreach ($obj_types as $t) {
755 if ($this->context == self::CONTEXT_ADMINISTRATION) {
760 $record_obj->setActive(isset($post_active[$record_obj->getRecordId()]));
763 $record_obj->setGlobalPosition((
int) $sorted_positions[$record_obj->getRecordId()]);
764 $record_obj->update();
770 if ($item[
'readonly'] &&
772 ($post_active[$item[
'id']] ??
false)) {
773 $selected_global[] = $item[
'id'];
774 } elseif ($item[
'local']) {
776 $record_obj->setActive((
bool) ($post_active[$item[
'id']] ??
false));
777 $record_obj->update();
782 if ($this->context == self::CONTEXT_OBJECT) {
783 $local_position = new \ilAdvancedMDRecordObjectOrdering(
788 $local_position->setPosition((
int) $sorted_positions[$item[
'id']]);
789 $local_position->save();
793 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
794 $this->
ctrl->redirect($this,
"showRecords");
799 $field_ids = $this->getFieldIdsFromPost();
800 if (!count($field_ids)) {
801 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
806 $this->initRecordObject();
807 $this->setRecordSubTabs(2);
812 $c_gui->setFormAction($this->
ctrl->getFormAction($this,
"deleteFields"));
813 $c_gui->setHeaderText($this->
lng->txt(
"md_adv_delete_fields_sure"));
814 $c_gui->setCancel($this->
lng->txt(
"cancel"),
"editFields");
815 $c_gui->setConfirm($this->
lng->txt(
"confirm"),
"deleteFields");
818 foreach ($field_ids as $field_id) {
820 $c_gui->addItem(
"field_id[]", (
string) $field_id, $field->getTitle() ?:
'No Title');
822 $this->tpl->setContent($c_gui->getHTML());
827 $this->
ctrl->saveParameter($this,
'record_id');
829 $field_ids = $this->getFieldIdsFromPost();
830 if (!count($field_ids)) {
831 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
838 foreach ($field_ids as $field_id) {
839 if (!$this->getPermissions()->hasPermission(
845 $fail[] = $field->getTitle();
849 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_perm_delete') .
" " . implode(
", ", $fail),
true);
850 $this->
ctrl->redirect($this,
"editFields");
853 foreach ($field_ids as $field_id) {
857 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'md_adv_deleted_fields'),
true);
858 $this->
ctrl->redirect($this,
"editFields");
863 $record_id = $this->getRecordIdFromQuery();
865 $this->
ctrl->redirect($this,
'showRecords');
867 $this->initRecordObject();
868 $this->setRecordSubTabs(1,
true);
869 $this->tabs_gui->activateTab(self::TAB_RECORD_SETTINGS);
872 $this->initLanguage($record_id);
873 $this->showLanguageSwitch($record_id,
'editRecord');
874 $this->initForm(
'edit');
876 $this->tpl->setContent($this->
form->getHTML());
881 $record_id = $this->getRecordIdFromQuery();
883 $this->
ctrl->redirect($this,
'showRecords');
885 $this->
ctrl->saveParameter($this,
'record_id');
886 $this->initRecordObject();
887 $this->setRecordSubTabs();
888 $this->initLanguage($record_id);
889 $this->showLanguageSwitch($record_id,
'editFields');
891 $perm = $this->getPermissions()->hasPermissions(
893 (
int) $this->record->getRecordId(),
908 $this->
ctrl->setParameter($this,
'ftype', $type);
909 $create_link = $this->
ctrl->getLinkTarget($this,
'createField');
910 $this->
ctrl->clearParameterByClass(strtolower(self::class),
'ftype');
912 $field_buttons[] = $this->ui_factory->button()->shy(
913 $this->
lng->txt($field->getTypeTitle()),
917 if (!$field->isFilterSupported()) {
918 $filter_warn[] = $this->
lng->txt($field->getTypeTitle());
922 if (count($this->
toolbar->getItems())) {
923 $this->
toolbar->addSeparator();
926 $dropdown = $this->ui_factory->dropdown()
927 ->standard($field_buttons)
928 ->withLabel($this->
lng->txt(
'meta_advmd_add_field'));
929 $this->
toolbar->addComponent($dropdown);
933 if (
sizeof($filter_warn)) {
934 $this->tpl->setOnScreenMessage(
'info', sprintf($this->
lng->txt(
"md_adv_field_filter_warning"), implode(
", ", $filter_warn)));
939 $this->record->getRecordId(),
941 $this->active_language
947 $this->getPermissions(),
949 $this->record->getDefaultLanguage()
951 $table_gui->setTitle($this->
lng->txt(
"md_adv_field_table"));
952 $table_gui->parseDefinitions($fields);
953 if (
sizeof($fields)) {
954 $table_gui->addCommandButton(
"updateFields", $this->
lng->txt(
"save"));
956 $table_gui->addCommandButton(
"showRecords", $this->
lng->txt(
'cancel'));
957 $table_gui->addMultiCommand(
"confirmDeleteFields", $this->
lng->txt(
"delete"));
958 $table_gui->setSelectAllCheckbox(
"field_id");
960 $this->tpl->setContent($table_gui->getHTML());
969 $this->
ctrl->saveParameter($this,
'record_id');
970 $positions = $this->getPositionsFromPost();
971 asort($positions, SORT_NUMERIC);
972 $record_id = $this->getRecordIdFromQuery();
974 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
981 if ($this->getPermissions()->hasPermission(
986 $positions_flipped = array_flip(array_keys($positions));
987 foreach ($fields as $field) {
988 $field->setPosition((
int) $positions_flipped[$field->getFieldId()]);
993 foreach ($fields as $field) {
994 if ($this->getPermissions()->hasPermission(
996 (
int) $field->getFieldId(),
1000 $post_searchable = (array) ($this->
http->request()->getParsedBody()[
'searchable'] ?? []);
1001 $field->setSearchable((
bool) ($post_searchable[$field->getFieldId()] ??
false));
1006 $language = $this->request->getQueryParams()[
'mdlang'] ??
false;
1008 $this->
ctrl->setParameter($this,
'mdlang', $this->request->getQueryParams()[
'mdlang']);
1010 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
1011 $this->
ctrl->redirect($this,
"editFields");
1021 $record_id = $this->getRecordIdFromQuery();
1023 $this->
ctrl->redirect($this,
'showRecords');
1025 $this->initRecordObject();
1026 $this->initLanguage($record_id);
1027 $this->showLanguageSwitch($record_id,
'editRecord');
1029 $form = $this->initForm(
'edit');
1030 if (!$this->
form->checkInput()) {
1031 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
1032 $this->
form->setValuesByPost();
1033 $this->editRecord($this->
form);
1037 $this->loadRecordFormData($form);
1038 $this->record->update();
1041 $translations->updateTranslations(
1042 $this->active_language,
1043 $this->
form->getInput(
'title'),
1044 $this->form->getInput(
'desc')
1047 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
1048 $this->
ctrl->redirect($this,
'editRecord');
1058 $this->initRecordObject();
1059 $this->setRecordSubTabs();
1061 $this->initForm(
'create');
1063 $this->tpl->setContent($this->
form->getHTML());
1068 $this->initRecordObject();
1069 $this->setRecordSubTabs();
1072 $this->initImportForm();
1073 $this->tpl->setContent($this->import_form->getHTML());
1081 $this->tabs_gui->clearTargets();
1082 $this->tabs_gui->clearSubTabs();
1085 $this->tabs_gui->setBackTarget(
1086 $this->
lng->txt(
'md_adv_record_list'),
1087 $this->ctrl->getLinkTarget($this,
'showRecords')
1090 if ($show_settings) {
1091 $this->tabs_gui->addTab(
1092 self::TAB_RECORD_SETTINGS,
1093 $this->
lng->txt(
'settings'),
1094 $this->ctrl->getLinkTarget($this, self::TAB_RECORD_SETTINGS)
1096 $this->
ctrl->setParameterByClass(
1097 strtolower(\ilAdvancedMDRecordTranslationGUI::class),
1099 $this->record->getRecordId()
1101 $this->
lng->loadLanguageModule(
'obj');
1102 $this->tabs_gui->addTab(
1103 self::TAB_TRANSLATION,
1104 $this->
lng->txt(
'obj_multilinguality'),
1105 $this->ctrl->getLinkTargetByClass(
1106 strtolower(\ilAdvancedMDRecordTranslationGUI::class),
1113 $this->tabs_gui->setBack2Target(
1114 $this->
lng->txt(
'md_adv_record_list'),
1115 $this->ctrl->getLinkTarget($this,
'showRecords')
1117 $this->tabs_gui->setBackTarget(
1118 $this->
lng->txt(
'md_adv_field_list'),
1119 $this->ctrl->getLinkTarget($this,
'editFields')
1126 if (is_object($this->import_form)) {
1131 $this->import_form->setMultipart(
true);
1132 $this->import_form->setFormAction($this->
ctrl->getFormAction($this));
1136 $file->setSuffixes(array(
'xml'));
1137 $file->setRequired(
true);
1138 $this->import_form->addItem($file);
1140 $this->import_form->setTitle($this->
lng->txt(
'md_adv_import_record'));
1141 $this->import_form->addCommandButton(
'importRecord', $this->
lng->txt(
'import'));
1142 $this->import_form->addCommandButton(
'showRecords', $this->
lng->txt(
'cancel'));
1147 $this->initImportForm();
1148 if (!$this->import_form->checkInput()) {
1149 $this->import_form->setValuesByPost();
1150 $this->importRecords();
1155 if (!$create_time = $import_files->moveUploadedFile($_FILES[
'file'][
'tmp_name'])) {
1156 $this->createRecord();
1164 if ($this->context === self::CONTEXT_OBJECT) {
1165 $parser->setContext($this->obj_id, $this->obj_type, $this->sub_type);
1170 $parser->startParsing();
1174 $parser->startParsing();
1175 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'md_adv_added_new_record'),
true);
1176 $this->
ctrl->redirect($this,
"showRecords");
1178 $this->tpl->setOnScreenMessage(
'failure', $exc->getMessage(),
true);
1179 $this->
ctrl->redirect($this,
"importRecords");
1183 $import_files->deleteFileByCreationDate($create_time);
1193 $this->initRecordObject();
1194 $form = $this->initForm(
'create');
1195 if (!$this->
form->checkInput()) {
1196 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
1197 $this->createRecord($this->
form);
1201 $record = $this->loadRecordFormData($form);
1202 if ($this->obj_type) {
1203 $sub_types = (!is_array($this->sub_type))
1206 $assigned_object_types = array_map(
function ($sub_type) {
1208 "obj_type" => $this->obj_type,
1209 "sub_type" => $sub_type,
1213 $this->record->setAssignedObjectTypes($assigned_object_types);
1216 $record->setDefaultLanguage($this->
lng->getDefaultLanguage());
1220 $translations->addTranslationEntry($record->getDefaultLanguage(),
true);
1221 $translations->updateTranslations(
1222 $record->getDefaultLanguage(),
1223 $this->form->getInput(
'title'),
1224 $this->form->getInput(
'desc')
1226 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'md_adv_added_new_record'),
true);
1227 $this->
ctrl->redirect($this,
'showRecords');
1236 $record_id = $this->getRecordIdFromQuery();
1237 $field_id = $this->getFieldIdFromQuery();
1238 if (!$record_id || !$field_id) {
1239 $this->editFields();
1242 $this->
ctrl->saveParameter($this,
'field_id');
1243 $this->
ctrl->saveParameter($this,
'record_id');
1244 $this->initRecordObject();
1245 $this->setRecordSubTabs(2);
1250 $this->initLanguage($this->record->getRecordId());
1251 $this->showLanguageSwitch($this->record->getRecordId(),
'editField');
1252 $a_form = $this->initFieldForm($field_definition);
1255 if ($field_definition->hasComplexOptions()) {
1256 $table = $field_definition->getComplexOptionsOverview($this,
"editField");
1258 $this->tpl->setContent($a_form->getHTML() . $table);
1267 $record_id = $this->getRecordIdFromQuery();
1268 $field_id = $this->getFieldIdFromQuery();
1269 $this->
ctrl->saveParameter($this,
'record_id');
1270 $this->
ctrl->saveParameter($this,
'field_id');
1272 if (!$record_id || !$field_id) {
1273 $this->editFields();
1277 $this->initRecordObject();
1278 $this->initLanguage($record_id);
1279 $this->showLanguageSwitch($record_id,
'editField');
1283 $form = $this->initFieldForm($field_definition);
1284 if ($form->checkInput()) {
1285 $field_definition->importDefinitionFormPostValues($form, $this->getPermissions(), $this->active_language);
1286 if (!$field_definition->importDefinitionFormPostValuesNeedsConfirmation()) {
1287 $field_definition->update();
1289 $translations->updateFromForm($field_id, $this->active_language, $form);
1291 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
1292 $this->
ctrl->redirect($this,
'editField');
1298 $form->setValuesByPost();
1302 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"md_adv_confirm_definition"));
1303 $field_definition->prepareDefinitionFormConfirmation($form);
1306 $this->editField($form);
1315 $record_id = $this->getRecordIdFromQuery();
1316 $field_type = $this->getFieldTypeFromPost();
1318 $field_type = $this->getFieldTypeFromQuery();
1321 $this->initRecordObject();
1322 $this->
ctrl->setParameter($this,
'ftype', $field_type);
1323 $this->setRecordSubTabs(2);
1324 if (!$record_id || !$field_type) {
1325 $this->editFields();
1331 $field_definition->setRecordId($record_id);
1332 $a_form = $this->initFieldForm($field_definition);
1334 $this->tpl->setContent($a_form->getHTML());
1339 $record_id = $this->getRecordIdFromQuery();
1340 $ftype = $this->getFieldTypeFromQuery();
1342 if (!$record_id || !$ftype) {
1343 $this->editFields();
1347 $this->initRecordObject();
1348 $this->initLanguage($record_id);
1349 $this->
ctrl->saveParameter($this,
'ftype');
1355 $field_definition->setRecordId($record_id);
1356 $form = $this->initFieldForm($field_definition);
1358 if ($form->checkInput()) {
1359 $field_definition->importDefinitionFormPostValues($form, $this->getPermissions(), $this->active_language);
1360 $field_definition->save();
1363 $translations->read();
1364 $translations->updateFromForm($field_definition->getFieldId(), $this->active_language, $form);
1366 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'save_settings'),
true);
1367 $this->
ctrl->redirect($this,
"editFields");
1370 $form->setValuesByPost();
1371 $this->createField($form);
1376 $is_creation_mode = $a_definition->
getFieldId() ? false :
true;
1379 $form->setFormAction($this->
ctrl->getFormAction($this));
1382 if ($is_creation_mode) {
1385 $form->setDescription($translations->getFormTranslationInfo(
1387 $this->active_language
1392 $form->addItem($type);
1395 if ($is_creation_mode) {
1396 $form->setTitle($this->
lng->txt(
'md_adv_create_field'));
1397 $form->addCommandButton(
'saveField', $this->
lng->txt(
'create'));
1399 $form->setTitle($this->
lng->txt(
'md_adv_edit_field'));
1400 $form->addCommandButton(
'updateField', $this->
lng->txt(
'save'));
1403 $form->addCommandButton(
'editFields', $this->
lng->txt(
'cancel'));
1413 $perm = $this->getPermissions()->hasPermissions(
1415 $this->record->getRecordId(),
1433 $this->
form =
new ilPropertyFormGUI();
1436 $this->
form->setDescription($translations->getFormTranslationInfo($this->active_language));
1437 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
1441 $title->setValue($this->record->getTitle());
1442 $title->setSize(20);
1443 $title->setMaxLength(70);
1444 $title->setRequired(
true);
1447 $title->setDisabled(
true);
1449 $this->
form->addItem($title);
1450 $translations->modifyTranslationInfoForTitle($this->
form, $title, $this->active_language);
1454 $desc->setValue($this->record->getDescription());
1458 $desc->setDisabled(
true);
1460 $this->
form->addItem($desc);
1461 $translations->modifyTranslationInfoForDescription($this->
form, $desc, $this->active_language);
1465 $check->setChecked($this->record->isActive());
1470 $check->setDisabled(
true);
1473 if (!$this->obj_type) {
1476 $scope->setInfo($this->
lng->txt(
'md_adv_scope_info'));
1477 $scope->setChecked($this->record->enabledScope());
1481 $this->
lng->txt(
'md_adv_scope_objects'),
1486 $subitems->setValue($this->record->getScopeRefIds());
1487 $exp = $subitems->getExplorerGUI();
1489 $definition =
$GLOBALS[
'DIC'][
'objDefinition'];
1491 foreach ($definition->getAllRepositoryTypes() as $type) {
1492 if ($definition->isContainer($type)) {
1493 $white_list[] = $type;
1497 $exp->setTypeWhiteList($white_list);
1498 $exp->setSkipRootNode(
false);
1500 $scope->addSubItem($subitems);
1503 if (!$this->obj_type) {
1505 $section->setTitle($this->
lng->txt(
'md_obj_types'));
1506 $this->
form->addItem($section);
1510 0 => $this->
lng->txt(
"meta_obj_type_inactive"),
1511 1 => $this->lng->txt(
"meta_obj_type_mandatory"),
1512 2 => $this->lng->txt(
"meta_obj_type_optional")
1516 $t = $type[
"obj_type"] .
":" . $type[
"sub_type"];
1517 $this->
lng->loadLanguageModule($type[
"obj_type"]);
1524 if ($type[
"obj_type"] ==
"prtf" && $type[
"sub_type"] ==
"pfpg") {
1528 if ($type[
"obj_type"] ==
"tals" && $type[
"sub_type"] ==
"etal") {
1534 switch ($type[
"obj_type"]) {
1537 unset($type_options[1]);
1541 unset($type_options[1]);
1545 unset($type_options[2]);
1550 if ($a_mode ==
"edit") {
1551 foreach ($this->record->getAssignedObjectTypes() as $item) {
1552 if ($item[
"obj_type"] == $type[
"obj_type"] &&
1553 $item[
"sub_type"] == $type[
"sub_type"]) {
1554 $value = $item[
"optional"]
1561 $sel_name =
'obj_types__' . $t;
1565 $hidden->setValue((
string) $value);
1566 $this->
form->addItem($hidden);
1572 $check->setOptions($type_options);
1573 $check->setValue($value);
1577 $check->setDisabled(
true);
1584 $this->
form->setTitle($this->
lng->txt(
'md_adv_create_record'));
1585 $this->
form->addCommandButton(
'saveRecord', $this->
lng->txt(
'add'));
1586 $this->
form->addCommandButton(
'showRecords', $this->
lng->txt(
'cancel'));
1590 $this->
form->setTitle($this->
lng->txt(
'md_adv_edit_record'));
1591 $this->
form->addCommandButton(
'updateRecord', $this->
lng->txt(
'save'));
1592 $this->
form->addCommandButton(
'showRecords', $this->
lng->txt(
'cancel'));
1608 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
1609 #$this->form->setTableWidth('100%');
1612 foreach ($visible_records as $obj_type => $records) {
1613 $read_only = !$this->
access->checkAccess(
'write',
'', $this->ref_id);
1620 $section->setTitle($this->
lng->txt(
'objs_' . $obj_type));
1621 $this->
form->addItem($section);
1625 $check->setOptionTitle($this->
lng->txt(
'md_adv_desc_show'));
1626 $check->setChecked($sub->isDescriptionEnabled());
1630 $check->setDisabled(
true);
1635 $check->setOptionTitle($this->
lng->txt(
'md_adv_fields_show'));
1636 $check->setChecked($sub->enabledFieldNames());
1640 $check->setDisabled(
true);
1644 $definitions = $sub->sortDefinitions($definitions);
1647 foreach ($definitions as $def) {
1648 $definition_id = $def->getFieldId();
1651 $title = $def->getTitle() .
' (' . $title .
')';
1655 $check->setOptionTitle($this->
lng->txt(
'md_adv_show'));
1656 $check->setChecked($sub->isSubstituted($definition_id));
1659 $check->setDisabled(
true);
1663 $this->
lng->txt(
'position'),
1664 'position_' . $obj_type .
'_' . $definition_id
1667 $pos->setMaxLength(4);
1668 $pos->allowDecimals(
true);
1669 $pos->setValue(sprintf(
'%.1f',
$counter++));
1670 $check->addSubItem($pos);
1673 $pos->setDisabled(
true);
1677 $this->
lng->txt(
'bold'),
1678 'bold_' . $obj_type .
'_' . $definition_id
1680 $bold->setValue(
"1");
1681 $bold->setChecked($sub->isBold($definition_id));
1682 $check->addSubItem($bold);
1685 $bold->setDisabled(
true);
1689 $this->
lng->txt(
'newline'),
1690 'newline_' . $obj_type .
'_' . $definition_id
1692 $bold->setValue(
"1");
1693 $bold->setChecked($sub->hasNewline($definition_id));
1694 $check->addSubItem($bold);
1697 $bold->setDisabled(
true);
1703 $this->
form->setTitle($this->
lng->txt(
'md_adv_substitution_table'));
1705 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1706 $this->
form->addCommandButton(
'updateSubstitutions', $this->
lng->txt(
'save'));
1715 $perm = $this->getPermissions()->hasPermissions(
1717 $this->record->getRecordId(),
1736 $this->record->setActive((
bool) $form->
getInput(
'active'));
1740 $translations->getDefaultTranslation() ==
null ||
1741 $translations->getDefaultTranslation()->getLangKey() == $this->active_language
1743 $this->record->setTitle((
string) $form->
getInput(
'title'));
1748 $translations->getDefaultTranslation() ==
null ||
1749 $translations->getDefaultTranslation()->getLangKey() == $this->active_language) {
1750 $this->record->setDescription($form->
getInput(
'desc'));
1754 if (!$this->obj_type) {
1758 $t = $type[
"obj_type"] .
":" . $type[
"sub_type"];
1759 $value = $form->
getInput(
'obj_types__' . $t);
1764 'obj_type' => $type[
'obj_type'],
1765 'sub_type' => $type[
'sub_type'],
1766 'optional' => ($value > 1)
1769 $this->record->setAssignedObjectTypes($obj_types);
1774 $scopes_selection = $form->
getInput(
'scope_containers');
1775 if (
$scopes && is_array($scopes_selection)) {
1776 $this->record->enableScope(
true);
1777 $this->record->setScopes(
1779 function (
string $scope_ref_id) {
1781 $scope->setRefId((
int) $scope_ref_id);
1788 $this->record->enableScope(
false);
1789 $this->record->setScopes([]);
1791 return $this->record;
1800 $record_id = $this->getRecordIdFromQuery();
1802 $this->
ctrl->saveParameter($this,
'record_id');
1805 if (!$record_id && $this->obj_id) {
1806 $this->record->setParentObject($this->obj_id);
1809 return $this->record;
1818 if (
$context == self::CONTEXT_OBJECT) {
1822 $this->tabs_gui->clearSubTabs();
1824 $this->tabs_gui->addSubTabTarget(
1825 "md_adv_record_list",
1826 $this->
ctrl->getLinkTarget($this,
"showRecords"),
1834 $this->tabs_gui->addSubTabTarget(
1835 "md_adv_presentation",
1836 $this->
ctrl->getLinkTarget($this,
"showPresentation")
1840 $this->tabs_gui->addSubTabTarget(
1842 $this->
ctrl->getLinkTarget($this,
"showFiles"),
1855 $sub_type = (!is_array($this->sub_type))
1859 if ($this->context === self::CONTEXT_OBJECT) {
1861 foreach ($sub_type as $st) {
1868 $records = $orderings->sortRecords($records, $this->obj_id);
1873 foreach ($records as $record) {
1874 $parent_id = $record->getParentObject();
1876 if ($this->context == self::CONTEXT_ADMINISTRATION) {
1882 if ($parent_id && $parent_id != $this->obj_id) {
1887 if (!$parent_id && !$record->isActive()) {
1894 $record->getScopes()
1902 $tmp_arr[
'readonly'] =
null;
1903 $tmp_arr[
'local'] =
null;
1904 $tmp_arr[
'optional'] =
null;
1905 $tmp_arr[
'id'] = $record->getRecordId();
1906 $tmp_arr[
'active'] = $record->isActive();
1907 $tmp_arr[
'title'] = $record->getTitle();
1908 $tmp_arr[
'description'] = $record->getDescription();
1909 $tmp_arr[
'fields'] = [];
1916 $tmp_arr[
'obj_types'] = $record->getAssignedObjectTypes();
1917 foreach ($record->getAssignedObjectTypes() as $idx => $item) {
1918 $tmp_arr[
'obj_types'][$idx][
'context'] =
null;
1921 $tmp_arr[
'position'] = $position;
1923 $tmp_arr[
'perm'] = $this->permissions->hasPermissions(
1925 $record->getRecordId(),
1939 if ($this->obj_type) {
1940 $tmp_arr[
"readonly"] = !(bool) $parent_id;
1941 $tmp_arr[
"local"] = $parent_id;
1944 $assigned = (bool) $parent_id;
1946 foreach ($tmp_arr[
'obj_types'] as $idx => $item) {
1947 if ($item[
"obj_type"] == $this->obj_type &&
1948 in_array($item[
"sub_type"], $sub_type)) {
1950 $optional = $item[
"optional"];
1951 $tmp_arr[
'obj_types'][$idx][
'context'] =
true;
1953 unset($tmp_arr[
'obj_types'][$idx]);
1956 $tmp_arr[
'optional'] = $optional;
1960 $tmp_arr[
'local_selected'] = [];
1961 foreach ($selected as $key => $records) {
1962 if (in_array($record->getRecordId(), $records)) {
1963 $tmp_arr[
'local_selected'][$this->obj_type][] = $key;
1969 if ($assigned ??
true) {
1983 $field_id = $this->getFieldIdFromQuery();
1985 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_select_one'));
1986 $this->
ctrl->redirect($this,
'showRecords');
1990 if (!$field_definition->hasComplexOptions()) {
1991 $this->
ctrl->redirect($this,
"editField");
1995 $a_form = $this->initComplexOptionForm($field_definition);
1998 $this->tpl->setContent($a_form->getHTML());
2003 $this->
ctrl->saveParameter($this,
"record_id");
2004 $this->
ctrl->saveParameter($this,
"field_id");
2005 $this->
ctrl->saveParameter($this,
"oid");
2008 $form->setTitle($this->
lng->txt(
"md_adv_edit_complex_option"));
2009 $form->setFormAction($this->
ctrl->getFormAction($this,
"updateComplexOption"));
2011 $oid = $this->getOidFromQuery();
2012 $a_def->initOptionForm($form, $oid);
2014 $form->addCommandButton(
"updateComplexOption", $this->
lng->txt(
"save"));
2015 $form->addCommandButton(
"editField", $this->
lng->txt(
"cancel"));
2022 $field_id = $this->getFieldIdFromQuery();
2024 $oid = $this->getOidFromQuery();
2026 if ($field_definition->hasComplexOptions()) {
2027 $form = $this->initComplexOptionForm($field_definition);
2028 if ($form->checkInput() &&
2029 $field_definition->updateComplexOption($form, $oid)) {
2030 $field_definition->update();
2031 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
2035 $this->
ctrl->redirect($this,
"editField");
2043 foreach ($translations->getTranslations() as $translation) {
2044 if ($translation->getLangKey() == $translations->getDefaultLanguage()) {
2045 $default = $translation->getLangKey();
2048 $active = $this->request->getQueryParams()[
'mdlang'] ?? $default;
2049 $this->active_language = $active;
2056 if (count($translations->getTranslations()) <= 1) {
2060 foreach ($translations->getTranslations() as $translation) {
2061 $this->
ctrl->setParameter($this,
'mdlang', $translation->getLangKey());
2062 $actions[$translation->getLangKey()] = $this->
ctrl->getLinkTarget(
2067 $this->
ctrl->setParameter($this,
'mdlang', $this->active_language);
2068 $view_control = $this->ui_factory->viewControl()->mode(
2070 $this->
lng->txt(
'meta_aria_language_selection')
2071 )->withActive($this->active_language);
2072 $this->
toolbar->addComponent($view_control);
Builds a Color from either hex- or rgb values.
Class ilAccessHandler Checks access for ILIAS objects.
AMD field abstract base class.
static getInstancesByRecordId( $a_record_id, $a_only_searchable=false, string $language='')
Get definitions by record id.
static getInstancesByObjType($a_obj_type, $a_active_only=true)
getFieldId()
Get field_id.
getDescription()
Get description.
static getValidTypes()
Get all valid types.
addToFieldDefinitionForm(ilPropertyFormGUI $a_form, ilAdvancedMDPermissionHelper $a_permissions, string $language='')
Add input elements to definition form.
static getInstance(?int $a_field_id, ?int $a_type=null, string $language='')
static getInstanceByRecordId(int $record_id)
Advanced metadata permission helper.
const int SUBACTION_FIELD_SEARCHABLE
const int ACTION_FIELD_DELETE
const int ACTION_RECORD_EDIT
const int SUBACTION_RECORD_OBJECT_TYPES
const int ACTION_RECORD_EXPORT
const int SUBACTION_RECORD_TITLE
const int ACTION_MD_IMPORT_RECORDS
const int ACTION_RECORD_EDIT_PROPERTY
const int ACTION_RECORD_EDIT_FIELDS
const int ACTION_FIELD_EDIT_PROPERTY
const int ACTION_RECORD_FIELD_POSITIONS
const int ACTION_RECORD_DELETE
const int ACTION_RECORD_TOGGLE_ACTIVATION
const int SUBACTION_RECORD_DESCRIPTION
const int ACTION_MD_CREATE_RECORD
const int ACTION_RECORD_CREATE_FIELD
SAX based XML parser for record import files.
const MODE_INSERT_VALIDATION
Scope restrictions for advanced md records.
static getInstanceByRecordId(int $record_id)
static _lookupTitle(int $a_record_id)
static deleteObjRecSelection(int $a_obj_id)
Delete repository object record selection.
static _getAllRecordsByObjectType()
Get records by obj_type Note: this returns only records with no sub types!
static _getInstanceByRecordId(int $a_record_id)
static _getAssignableObjectTypes(bool $a_include_text=false)
Get assignable object type @access public.
static getObjRecSelection(int $a_obj_id, string $a_sub_type="")
Get repository object record selection.
static _getRecords()
Get records @access public.
static saveObjRecSelection(int $a_obj_id, string $a_sub_type="", ?array $a_records=null, bool $a_delete_before=true)
Save repository object record selection.
static isFilteredByScope($a_ref_id, array $scopes)
Check if a given ref id is not filtered by scope restriction.
loadRecordFormData(ilPropertyFormGUI $form)
initLanguage(int $record_id)
updateSubstitutions()
Update substitution @access public.
showFiles()
Show export files.
createField(?ilPropertyFormGUI $a_form=null)
Show field type selection @access public.
editField(?ilPropertyFormGUI $a_form=null)
Edit field @access public.
updateRecord()
Update record @access public.
const CONTEXT_ADMINISTRATION
RefineryFactory $refinery
updateRecords()
Save records (assigned object typed) @access public.
initContextParameters(int $context, int $ref_id, ?string $obj_type, $sub_type)
ilGlobalTemplateInterface $tpl
editComplexOption(?ilPropertyFormGUI $a_form=null)
setSubTabs(int $context)
Set sub tabs @access protected.
__construct(int $a_context, int $a_ref_id, ?string $a_obj_type=null, $a_sub_type=null)
Constructor @access public.
ilAdvancedMDRecord $record
saveRecord()
Save record @access public.
confirmDeleteFiles()
confirm delete files @access public
initFieldForm(ilAdvancedMDFieldDefinition $a_definition)
initFormSubstitutions()
init form table 'substitutions' @access protected
initComplexOptionForm(ilAdvancedMDFieldDefinition $a_def)
deleteRecords()
Permanently delete records @access public.
exportRecords()
Export records @access public.
updateFields()
Update fields @access public.
const TAB_RECORD_SETTINGS
ilAdvancedMDPermissionHelper $permissions
confirmDeleteRecords()
Confirm delete @access public.
RequestInterface $request
showLanguageSwitch(int $record_id, string $target)
createRecord(?ilPropertyFormGUI $form=null)
Show @access public.
downloadFile()
Download XML file @access public.
editRecord(?ilPropertyFormGUI $form=null)
ilPropertyFormGUI $import_form
updateField()
Update field @access public.
setRecordSubTabs(int $level=1, bool $show_settings=false)
Set subtabs for record editing/creation.
deleteFiles()
Delete files @access public.
static _getInstanceByObjectType(string $a_type)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
static getInstance(int $a_user_id, int $a_ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilCtrl provides processing control methods.
Component logger with individual log levels by component id.
This class represents a non editable value in a property form.
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
Interface GlobalHttpState.
An entity that renders components to a string output.
static http()
Fetches the global http state from ILIAS.
form(?array $class_path, string $cmd, string $submit_caption="")
if(!file_exists('../ilias.ini.php'))