19declare(strict_types=1);
21use Psr\Http\Message\ServerRequestInterface;
26use ILIAS\Object\CreationCallbackTrait;
36 use CreationCallbackTrait;
119 $this->request =
$DIC->http()->request();
120 $this->
locator = $DIC[
"ilLocator"];
121 $this->
user = $DIC->user();
122 $this->
access = $DIC->access();
124 $this->
toolbar = $DIC->toolbar();
125 $this->rbac_admin =
$DIC->rbac()->admin();
126 $this->rbac_system =
$DIC->rbac()->system();
127 $this->rbac_review =
$DIC->rbac()->review();
128 $this->object_service =
$DIC->object();
129 $this->obj_definition =
$DIC[
"objDefinition"];
130 $this->tpl =
$DIC[
"tpl"];
131 $this->tree =
$DIC->repositoryTree();
132 $this->
ctrl = $DIC->ctrl();
133 $this->
error = $DIC[
"ilErr"];
134 $this->
lng = $DIC->language();
135 $this->tabs_gui =
$DIC->tabs();
136 $this->
ilias = $DIC[
"ilias"];
137 $this->post_wrapper =
$DIC->http()->wrapper()->post();
138 $this->request_wrapper =
$DIC->http()->wrapper()->query();
142 $this->custom_icon_factory =
$DIC[
'object.customicons.factory'];
151 $params = array(
"ref_id",
"obj_id");
155 if ($this->request_wrapper->has(
"ref_id")) {
156 $this->requested_ref_id = $this->request_wrapper->retrieve(
"ref_id", $this->
refinery->kindlyTo()->int());
165 if ($this->request_wrapper->has(
"obj_id")) {
166 $this->obj_id = $this->request_wrapper->retrieve(
"obj_id", $this->
refinery->kindlyTo()->int());
172 $this->requested_crtptrefid = $this->retriever->getMaybeInt(
'crtptrefid', 0);
173 $this->requested_crtcb = $this->retriever->getMaybeInt(
'crtcb', 0);
174 $this->requested_new_type = $this->retriever->getMaybeString(
'new_type',
'');
177 if ($this->
id != 0) {
183 if (is_object($this->
object)) {
184 if ($this->call_by_reference && $this->ref_id == $this->requested_ref_id) {
185 $this->
ctrl->setContextObject(
187 $this->object->getType()
196 $this->notes_service =
$DIC->notes();
206 if (!in_array($mode, [
207 self::ADMIN_MODE_NONE,
208 self::ADMIN_MODE_REPOSITORY,
209 self::ADMIN_MODE_SETTINGS
213 $this->admin_mode = $mode;
233 $cmd = $this->
ctrl->getCmd();
259 $this->creation_mode = $mode;
270 if ($this->
id != 0) {
271 if ($this->call_by_reference) {
281 $this->tpl->loadStandardTemplate();
283 $base_class = $this->request_wrapper->retrieve(
"baseClass", $this->
refinery->kindlyTo()->string());
284 if (strtolower($base_class) ==
"iladministrationgui") {
286 $this->tpl->setLocator();
301 if ($this->call_by_reference) {
304 $class_name = $this->obj_definition->getClassName($obj_type);
305 $class = strtolower(
"ilObj" . $class_name .
"GUI");
306 $class_path = $this->
ctrl->lookupClassPath($class);
307 $class_name = $this->
ctrl->getClassForClasspath($class_path);
321 if ($file_upload_dropzone->isUploadAllowed($this->object->getType())) {
331 if (!is_object($this->
object)) {
332 if ($this->requested_crtptrefid > 0) {
334 $this->tpl->setTitle(
337 self::ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
344 $this->tpl->setTitle(
346 $this->
object->getPresentationTitle(),
347 self::ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
350 $this->tpl->setDescription(
352 $this->
object->getLongDescription(),
353 self::ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
357 $base_class = $this->request_wrapper->retrieve(
"baseClass", $this->
refinery->kindlyTo()->string());
358 if (strtolower($base_class) ==
"iladministrationgui") {
362 $this->tpl->setTitleIcon(
364 $this->lng->txt(
"obj_" . $this->object->getType())
367 if (!$this->obj_definition->isAdministrationObject($this->object->getType())) {
369 $lgui->initItem($this->
object->getRefId(), $this->object->getId(), $this->object->getType());
370 $this->tpl->setAlertProperties($lgui->getAlertProperties());
379 if (!$this->creation_mode && $this->
object) {
385 $this->object->getId()
388 $dispatcher->setSubObject($sub_type, $sub_id);
391 $this->
ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
393 $this->ctrl->getLinkTargetByClass([
"ilcommonactiondispatchergui",
"iltagginggui"],
"",
"",
true)
396 $lg = $dispatcher->initHeaderAction();
398 if (is_object($lg)) {
401 $lg->setContainerObject($this);
404 $lg->enableMultiDownload(
true);
409 $this->
access->checkAccess(
"write",
"", $this->ref_id) ||
410 $this->access->checkAccess(
"edit_permissions",
"", $this->ref_id) ||
411 $this->notes_service->domain()->commentsActive($this->object->getId())
413 $lg->enableComments(
true);
416 $lg->enableNotes(
true);
417 $lg->enableTags(
true);
431 !is_object($this->
object) ||
437 if (is_object($list_gui)) {
438 $this->tpl->setHeaderActionMenu($list_gui->getHeaderAction());
456 echo $lg->getHeaderAction();
459 echo $this->tpl->getOnLoadCodeForAsynch();
485 $this->tabs_gui->addTarget(
487 $this->
ctrl->getLinkTarget($this,
"view"),
494 $this->tabs_gui->addTarget(
496 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
513 if ($this->omit_locator) {
518 if ($this->call_by_reference) {
523 if ($this->requested_ref_id === 0) {
524 $ref_id = $this->
object->getRefId();
526 $ilLocator->addRepositoryItems(
$ref_id);
529 if (!$this->creation_mode) {
546 $this->omit_locator = $omit;
555 if ($this->admin_mode == self::ADMIN_MODE_SETTINGS) {
556 $this->
ctrl->setParameterByClass(
557 "ilobjsystemfoldergui",
562 $this->
lng->txt(
"administration"),
563 $this->ctrl->getLinkTargetByClass([
"iladministrationgui",
"ilobjsystemfoldergui"],
"")
567 $this->
object->getTitle(),
568 $this->ctrl->getLinkTarget($this,
"view")
572 $this->
ctrl->setParameterByClass(
573 "iladministrationgui",
577 $this->
ctrl->setParameterByClass(
578 "iladministrationgui",
582 $this->
ctrl->clearParametersByClass(
"iladministrationgui");
583 $this->
locator->addAdministrationItems();
593 if ($this->post_wrapper->has(
"mref_id")) {
594 $mref_id = $this->post_wrapper->retrieve(
596 $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
598 $_SESSION[
"saved_post"] = array_unique(array_merge($_SESSION[
"saved_post"], $mref_id));
602 $ru->deleteObjects($this->requested_ref_id,
ilSession::get(
"saved_post") ?? []);
604 $this->
ctrl->returnToParent($this);
613 $this->
ctrl->returnToParent($this);
623 $this->
ctrl->returnToParent($this);
634 $this->
ctrl->saveParameter($this,
"crtptrefid");
636 $this->
ctrl->saveParameter($this,
"crtcb");
639 $this->
error->raiseError($this->
lng->txt(
"permission_denied"), $this->error->MESSAGE);
641 $this->
lng->loadLanguageModule($new_type);
642 $this->
ctrl->setParameter($this,
"new_type", $new_type);
647 if ($this->request_wrapper->has(
"cpfl") && isset($forms[self::CFORM_CLONE])) {
648 $forms = array(self::CFORM_CLONE => $forms[self::CFORM_CLONE]);
677 foreach ($forms as
$id => $form) {
684 if (
sizeof($forms) == 1) {
685 $form_type = key($forms);
686 $forms = array_shift($forms);
689 if (method_exists($this,
"getCreationFormTitle")) {
690 $form_title = $this->getCreationFormTitle($form_type);
691 if ($form_title !=
"") {
692 $forms->setTitle($form_title);
695 return $forms->getHTML();
700 foreach ($forms as $form_type => $cf) {
701 $htpl =
new ilTemplate(
"tpl.creation_acc_head.html",
true,
true,
"Services/Object");
705 if (method_exists($this,
"getCreationFormTitle")) {
706 $form_title = $this->getCreationFormTitle($form_type);
709 $form_title = $cf->getTitle();
713 $htpl->setVariable(
"TITLE", $this->
lng->txt(
"option") .
" " . $cnt .
": " . $form_title);
715 $cf->setTitleIcon(
'');
716 $cf->setTableWidth(
"100%");
718 $acc->addItem($htpl->get(), $cf->getHTML());
723 return "<div class='ilCreationFormSection'>" . $acc->getHTML() .
"</div>";
730 $form->setTarget(
"_top");
731 $form->setFormAction($this->
ctrl->getFormAction($this,
"save"));
732 $form->setTitle($this->
lng->txt($new_type .
"_new"));
737 $ti->setRequired(
true);
748 $form->addCommandButton(
"save", $this->
lng->txt($new_type .
"_add"));
749 $form->addCommandButton(
"cancel", $this->
lng->txt(
"cancel"));
756 $this->
lng->loadLanguageModule(
'didactic');
757 $existing_exclusive =
false;
759 $options[
'dtpl_0'] = [
760 $this->
lng->txt(
'didactic_default_type'),
762 $this->
lng->txt(
'didactic_default_type_info'),
763 $this->lng->txt(
'objs_' . $this->type)
769 foreach ($templates as $template) {
770 if ($template->isEffective((
int) $this->requested_ref_id)) {
771 $options[
"dtpl_" . $template->getId()] = array(
772 $template->getPresentationTitle(),
773 $template->getPresentationDescription()
776 if ($template->isExclusive()) {
777 $existing_exclusive =
true;
785 if (
sizeof($options) > 1) {
787 $this->
lng->txt(
'type'),
794 $type->setValue($value);
796 if (!in_array($value, array_keys($options)) || ($existing_exclusive && $value ==
"dtpl_0")) {
798 $options[$value] = [$this->
lng->txt(
'not_available')];
801 if ($existing_exclusive) {
803 $keys = array_keys($options);
806 $type->setValue(
'dtpl_0');
811 foreach ($options as
$id =>
$data) {
813 if ($existing_exclusive &&
$id ==
'dtpl_0') {
815 $option->setDisabled(
true);
818 $type->addOption($option);
837 $this->
ctrl->redirectByClass(
"ilrepositorygui",
"");
844 $this->
error->raiseError($this->
lng->txt(
"no_create_permission"), $this->error->MESSAGE);
847 $this->
lng->loadLanguageModule($this->requested_new_type);
848 $this->
ctrl->setParameter($this,
"new_type", $this->requested_new_type);
851 if ($form->checkInput()) {
852 $this->
ctrl->setParameter($this,
"new_type",
"");
854 $class_name =
"ilObj" . $this->obj_definition->getClassName($this->requested_new_type);
855 $newObj =
new $class_name();
856 $newObj->setType($this->requested_new_type);
857 $newObj->setTitle($form->getInput(
"title"));
858 $newObj->setDescription($form->getInput(
"desc"));
859 $newObj->processAutoRating();
866 $newObj->applyDidacticTemplate($dtpl);
872 $form->setValuesByPost();
873 $this->tpl->setContent($form->getHTML());
881 if (!$this->post_wrapper->has(
"didactic_type")) {
885 $tpl = $this->post_wrapper->retrieve(
"didactic_type", $this->
refinery->kindlyTo()->string());
890 return (
int) substr(
$tpl, strlen(
$type) + 1);
898 if (!$parent_node_id) {
903 if ($this->requested_crtptrefid > 0) {
911 $this->obj_id = $obj->
getId();
919 $rbac_log_roles = $this->rbac_review->getParentRoleIds($this->ref_id,
false);
932 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"object_added"),
true);
933 $this->
ctrl->returnToParent($this);
939 $this->
error->raiseError($this->
lng->txt(
"msg_no_perm_write"), $this->error->MESSAGE);
942 $this->tabs_gui->activateTab(
"settings");
947 $form->setValuesByArray($values);
952 $this->tpl->setContent($form->getHTML());
967 $form->setFormAction($this->
ctrl->getFormAction($this,
"update"));
968 $form->setTitle($this->
lng->txt($this->object->getType() .
"_edit"));
973 $ti->setRequired(
true);
984 $form->addCommandButton(
"update", $this->
lng->txt(
"save"));
998 $values[
"title"] = $this->
object->getTitle();
999 $values[
"desc"] = $this->
object->getLongDescription();
1017 $this->
error->raiseError($this->
lng->txt(
"permission_denied"), $this->error->MESSAGE);
1021 if ($form->checkInput() && $this->validateCustom($form)) {
1022 $this->
object->setTitle($form->getInput(
"title"));
1023 $this->
object->setDescription($form->getInput(
"desc"));
1025 $this->
object->update();
1032 $this->tabs_gui->activateTab(
"settings");
1033 $form->setValuesByPost();
1034 $this->tpl->setContent($form->getHTML());
1057 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"),
true);
1058 $this->
ctrl->redirect($this,
"edit");
1065 $upload_files = $export_directory->getFilesFor($this->
user->getId(), $new_type);
1066 $has_upload_files =
false;
1067 if (count($upload_files)) {
1068 $has_upload_files =
true;
1072 $form->setTarget(
"_top");
1073 $form->setFormAction($this->
ctrl->getFormAction($this,
"importFile"));
1074 $form->setTitle($this->
lng->txt($new_type .
"_import"));
1077 $fi->setSuffixes(array(
"zip"));
1078 $fi->setRequired(
true);
1079 if ($has_upload_files) {
1080 $this->
lng->loadLanguageModule(
'content');
1082 $this->
lng->txt(
'cont_choose_file_source'),
1085 $option->setValue((
string) self::UPLOAD_TYPE_LOCAL);
1086 $form->addItem($option);
1088 $direct =
new ilRadioOption($this->
lng->txt(
'cont_choose_local'), (
string) self::UPLOAD_TYPE_LOCAL);
1089 $option->addOption($direct);
1091 $direct->addSubItem($fi);
1093 $this->
lng->txt(
'cont_choose_upload_dir'),
1094 (
string) self::UPLOAD_TYPE_UPLOAD_DIRECTORY
1096 $option->addOption($upload);
1098 $this->
lng->txt(
'cont_choose_upload_dir'),
1101 $upload_files[
''] = $this->
lng->txt(
'cont_select_from_upload_dir');
1102 $files->setOptions($upload_files);
1103 $files->setRequired(
true);
1104 $upload->addSubItem($files);
1107 if (!$has_upload_files) {
1108 $form->addItem($fi);
1111 $form->addCommandButton(
"importFile", $this->
lng->txt(
"import"));
1112 $form->addCommandButton(
"cancel", $this->
lng->txt(
"cancel"));
1124 if ($this->post_wrapper->has(
"upload_type")) {
1125 $upload_type = $this->post_wrapper->retrieve(
"upload_type", $this->
refinery->kindlyTo()->int());
1130 $this->
error->raiseError($this->
lng->txt(
"no_create_permission"));
1133 $this->
lng->loadLanguageModule($new_type);
1134 $this->
ctrl->setParameter($this,
"new_type", $new_type);
1137 if ($form->checkInput()) {
1139 if ($this->obj_definition->isContainer($new_type)) {
1142 $imp =
new ilImport((
int) $parent_id);
1146 if ($upload_type == self::UPLOAD_TYPE_LOCAL) {
1147 $new_id = $imp->importObject(
1149 $_FILES[
"importfile"][
"tmp_name"],
1150 $_FILES[
"importfile"][
"name"],
1154 $hash = $this->request->getParsedBody()[
'uploadFile'] ??
'';
1157 $file = $export_upload->getAbsolutePathForHash($this->
user->getId(), $new_type, $hash);
1159 $new_id = $imp->importObject(
1169 $this->tmp_import_dir = $imp->getTemporaryImportDir();
1170 $this->
lng->loadLanguageModule(
'obj');
1172 $this->tpl->setOnScreenMessage(
1174 $this->
lng->txt(
"obj_import_file_error") .
" <br />" . $e->getMessage()
1176 $form->setValuesByPost();
1177 $this->tpl->setContent($form->getHTML());
1182 $this->
ctrl->setParameter($this,
"new_type",
"");
1186 if (!$this->obj_definition->isContainer($new_type)) {
1190 if (count($ref_ids) === 1) {
1191 $newObj->setRefId((
int) current($ref_ids));
1198 if ($this->obj_definition->isContainer($new_type)) {
1199 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"container_import_zip_file_invalid"));
1207 $form->setValuesByPost();
1208 $this->tpl->setContent($form->getHTML());
1216 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"object_added"),
true);
1217 $this->
ctrl->returnToParent($this);
1223 public function getFormAction(
string $cmd,
string $default_form_action =
""): string
1225 if ($this->form_action[$cmd] !=
"") {
1226 return $this->form_action[$cmd];
1229 return $default_form_action;
1242 if (($this->return_location[$cmd] ??
"") !==
"") {
1243 return $this->return_location[$cmd];
1245 return $default_location;
1254 $this->return_location[$cmd] =
$location;
1260 protected function getTargetFrame(
string $cmd,
string $default_target_frame =
""): string
1262 if (isset($this->target_frame[$cmd]) && $this->target_frame[$cmd] !=
"") {
1263 return $this->target_frame[$cmd];
1266 if (!empty($default_target_frame)) {
1267 return "target=\"" . $default_target_frame .
"\"";
1278 $this->target_frame[$cmd] =
"target=\"" .
$target_frame .
"\"";
1285 if ($visible &&
$type ==
'crs') {
1292 if (!$tmp_obj->isActivated()) {
1310 $this->tabs_gui->activateTab(
'view');
1313 $this->
object->getType(),
1314 $this->object->getRefId(),
1315 $this->object->getId(),
1316 $this->user->getId()
1320 $this->
ctrl->setParameter($this,
'obj_id', $this->obj_id);
1326 $this->requested_ref_id,
1330 $this->tpl->setContent($itab->getHTML());
1341 if ($this->post_wrapper->has(
"id")) {
1342 $request_ids = $this->post_wrapper->retrieve(
1344 $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
1349 $this->request_wrapper->has(
"item_ref_id") &&
1350 $this->request_wrapper->retrieve(
"item_ref_id", $this->refinery->kindlyTo()->string()) !=
""
1352 $request_ids = [$this->request_wrapper->retrieve(
"item_ref_id", $this->
refinery->kindlyTo()->int())];
1356 if (count($request_ids) > 0) {
1357 foreach ($request_ids as $idx =>
$id) {
1358 $ids[
"id"][$idx] =
$id;
1366 if (!$ru->showDeleteConfirmation($ids[
"id"] ?? [],
$error)) {
1367 $this->
ctrl->returnToParent($this);
1376 if ($this->sub_objects ==
"") {
1377 $sub_objects = $this->obj_definition->getCreatableSubObjects(
1378 $this->
object->getType(),
1390 if ($row[
"max"] > 0) {
1392 for (
$i = 0;
$i < count($this->data[
"ctrl"]);
$i++) {
1393 if ($this->data[
"ctrl"][
$i][
"type"] == $row[
"name"]) {
1399 if ($row[
"max"] ==
"" || $count < $row[
"max"]) {
1400 $subobj[] = $row[
"name"];
1405 if (count($subobj) > 0) {
1407 $this->tpl->setCurrentBlock(
"add_object");
1408 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1409 $this->tpl->setVariable(
"BTN_NAME",
"create");
1410 $this->tpl->setVariable(
"TXT_ADD", $this->
lng->txt(
"add"));
1411 $this->tpl->parseCurrentBlock();
1432 $class_name = $this->obj_definition->getClassName($obj_type);
1433 $class = strtolower(
"ilObj" . $class_name .
"GUI");
1434 $this->
ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $ref_id);
1435 $this->
ctrl->redirectByClass(array(
"ilrepositorygui", $class), $cmd);
1449 $cp->setType(
$type);
1450 $target = $this->request_wrapper->has(
"ref_id")
1451 ? $this->request_wrapper->retrieve(
"ref_id", $this->
refinery->kindlyTo()->int())
1453 $cp->setTarget($target);
1455 $cp->showSourceSearch($tpl_name);
1458 return $cp->showSourceSearch(
null);
1469 if ($this->
ctrl->getNextClass() !=
"ilcolumngui") {
1473 if (!$this->
ctrl->isAsynch()) {
1480 $this->
html = $this->
ctrl->forwardCommand($column_gui);
1486 $this->
html = $this->
ctrl->forwardCommand($column_gui);
1515 $this->
ctrl->getNextClass() ==
"ilcolumngui" &&
1519 return $this->
ctrl->forwardCommand($column_gui);
1522 if (!$this->
ctrl->isAsynch()) {
1523 return $this->
ctrl->getHTML($column_gui);
1541 if (!is_int(strpos(
$_SERVER[
"PHP_SELF"],
"goto.php"))) {
1542 if ($perm !=
"create" && !is_object($this->
object)) {
1548 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_perm_read'),
true);
1549 $parent_ref_id = (
int) $this->tree->getParentNodeData($this->object->getRefId())[
'ref_id'];
1553 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_perm_read'),
true);
1560 if ($perm ==
"create") {
1567 if (!is_object($this->
object)) {
1572 $ref_id = $this->
object->getRefId();
1588 $ilAccess =
$DIC->access();
1626 $this->tpl->setFileUploadRefId($this->ref_id);
1639 $customIcon = $this->custom_icon_factory->getByObjId($this->
object->getId(), $this->object->getType());
1643 $title->setTitle($this->
lng->txt(
"icon_settings"));
1647 $form->addItem($title);
1649 $caption = $this->
lng->txt(
"cont_custom_icon");
1652 $icon->setSuffixes($customIcon->getSupportedFileExtensions());
1653 $icon->setUseCache(
false);
1654 if ($customIcon->exists()) {
1655 $icon->setImage($customIcon->getFullPath());
1657 $icon->setImage(
'');
1660 $form->addItem($icon);
1662 $title->addSubItem($icon);
1675 $this->
ctrl->redirectToURL($link);
1680 $this->favourites->add(
1681 $this->
user->getId(),
1682 $this->request_wrapper->retrieve(
"item_ref_id", $this->refinery->kindlyTo()->int())
1684 $this->
lng->loadLanguageModule(
"rep");
1685 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"rep_added_to_favourites"),
true);
1691 $this->
lng->loadLanguageModule(
"rep");
1692 $item_ref_id = $this->request_wrapper->retrieve(
"item_ref_id", $this->
refinery->kindlyTo()->int());
1693 $this->favourites->remove($this->
user->getId(), $item_ref_id);
1694 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"rep_removed_from_favourites"),
true);
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ArrayBasedRequestWrapper.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
TableGUI class for sub items listed in repository administration.
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
Column user interface class.
setEnableEdit(bool $a_enableedit)
setRepositoryMode(bool $a_repositorymode)
static getCmdSide()
Get Column Side of Current Command.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
Class ilCtrl provides processing control methods.
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
static lookupTemplateId(int $a_ref_id)
static getInstanceByObjectType(string $a_obj_type)
Error Handling & global info handling uses PEAR error class.
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 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...
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for the workflow of copying objects.
parses the objects.xml it handles the xml-description of all ilias objects
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjectGUI Basic methods of all Output classes.
ArrayBasedRequestWrapper $post_wrapper
ilObjectCustomIconFactory $custom_icon_factory
addDidacticTemplateOptions(array &$a_options)
Add custom templates.
static _gotoSharedWorkspaceNode(int $wsp_id)
confirmedDeleteObject()
confirmed deletion of object -> objects are moved to trash or deleted immediately,...
const UPLOAD_TYPE_UPLOAD_DIRECTORY
cancelCreation()
cancel create action and go back to repository parent
initImportForm(string $new_type)
importFileObject(int $parent_id=null)
ilGlobalTemplateInterface $tpl
setReturnLocation(string $cmd, string $location)
set specific return location for command
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
withReferences()
determines whether objects are referenced or not (got ref ids or not)
insertHeaderAction(?ilObjectListGUI $list_gui=null)
Insert header action into main template.
redirectAfterCreation()
Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357....
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
addExternalEditFormCustom(ilPropertyFormGUI $form)
getTabs()
@abstract overwrite in derived GUI class of your object type
ilRbacReview $rbac_review
deleteObject(bool $error=false)
Display deletion confirmation screen.
afterUpdate()
Post (successful) object update hook.
setColumnSettings(ilColumnGUI $column_gui)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
getRightColumnHTML()
Display right column.
initHeaderAction(?string $sub_type=null, ?int $sub_id=null)
Add header action menu.
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
enableDragDropFileUpload()
Enables the file upload into this object by dropping files.
setFormAction(string $cmd, string $form_action)
setCreationMode(bool $mode=true)
if true, a creation screen is displayed the current [ref_id] don't belong to the current class!...
const ADMIN_MODE_SETTINGS
getAdminTabs()
administration tabs show only permissions and trash folder
setAdminTabs()
set admin tabs
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
getFormAction(string $cmd, string $default_form_action="")
Get form action for command (command is method name without "Object", e.g.
ilObjectService $object_service
cancelObject()
cancel action and go back to previous page
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
ilRbacSystem $rbac_system
afterSave(ilObject $new_object)
Post (successful) object creation hook.
getCenterColumnHTML()
Get center column.
setTargetFrame(string $cmd, string $target_frame)
Set specific target frame for command.
setAdminMode(string $mode)
updateCustom(ilPropertyFormGUI $form)
Insert custom update form values into object.
isVisible(int $ref_id, string $type)
RequestWrapper $request_wrapper
initDidacticTemplate(ilPropertyFormGUI $form)
showCustomIconsEditing( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
show edit section of custom icons for container
addHeaderAction()
Add header action menu.
ILIAS Notes Service $notes_service
createObject()
create new object form
getCreationFormsHTML(array $forms)
Get HTML for creation forms (accordion)
addAdminLocatorItems(bool $do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded)
fillCloneTemplate(?string $tpl_name, string $type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...
omitLocator(bool $omit=true)
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
ilObjectDefinition $obj_definition
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
validateCustom(ilPropertyFormGUI $form)
Validate custom values (if not possible with checkInput())
afterImport(ilObject $new_object)
Post (successful) object import hook.
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
ilObjectRequestRetriever $retriever
redirectToRefId(int $ref_id, string $cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
int $requested_crtptrefid
prepareOutput(bool $show_sub_objects=true)
cancelDeleteObject()
cancel deletion of object
string $requested_new_type
ilFavouritesManager $favourites
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
ServerRequestInterface $request
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.
showPossibleSubObjects()
show possible sub objects (pull down menu)
initCreateForm(string $new_type)
updateObject()
updates object entry in object_data
const ADMIN_MODE_REPOSITORY
getTargetFrame(string $cmd, string $default_target_frame="")
get target frame for command (command is method name without "Object", e.g.
redrawHeaderActionObject()
Ajax call: redraw action header only.
putObjectInTree(ilObject $obj, int $parent_node_id=null)
Add object to tree at given position.
initCreationForms(string $new_type)
Init creation forms.
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
static prepareJsLinks(string $redraw_url, string $notes_url, string $tags_url, ilGlobalTemplateInterface $tpl=null)
Insert js/ajax links into template.
Base class for all sub item list gui's.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $id, bool $reference=false)
setPermissions(int $parent_ref_id)
createReference()
creates reference for object
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
putInTree(int $parent_ref_id)
maybe this method should be in tree object!?
static _getAllReferences(int $id)
get all reference ids for object ID
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...
Class ilRbacAdmin Core functions for role based access control.
static add(int $a_action, int $a_ref_id, array $a_diff, bool $a_source_ref_id=false)
static gatherFaPa(int $a_ref_id, array $a_role_ids, bool $a_add_action=false)
class ilRbacReview Contains Review functions of core Rbac.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
Repository GUI Utilities.
static get(string $a_var)
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
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...
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkForParentType(int $a_ref_id, string $a_type, bool $a_exclude_source_check=false)
Check for parent type e.g check if a folder (ref_id 3) is in a parent course obj => checkForParentTyp...
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface RequestWrapper.
callCreationCallback(\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLocator()
Insert locator.
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
get(string $key, Refinery\Transformation $t)
Get passed parameter, if not data passed, get key from http request.
Class ChatMainBarProvider \MainMenu\Provider.
header include for all ilias files.