91 function ilObjectGUI($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
true)
95 $this->tabs_gui =& $ilTabs;
115 if (!$a_call_by_reference)
117 $params = array(
"ref_id",
"obj_id");
120 $this->ctrl->saveParameter($this,
$params);
123 $this->tree =&
$tree;
124 $this->formaction = array();
125 $this->return_location = array();
126 $this->target_frame = array();
128 $this->sub_objects =
"";
130 $this->data = $a_data;
132 $this->call_by_reference = $a_call_by_reference;
133 $this->prepare_output = $a_prepare_output;
134 $this->creation_mode =
false;
136 $this->ref_id = ($this->call_by_reference) ? $this->
id :
$_GET[
"ref_id"];
137 $this->obj_id = ($this->call_by_reference) ?
$_GET[
"obj_id"] : $this->
id;
141 $this->link_params =
"ref_id=".$this->ref_id;
148 if (is_object($this->
object))
150 if ($this->call_by_reference && $this->ref_id ==
$_GET[
"ref_id"])
152 $this->ctrl->setContext($this->object->getId(),
153 $this->
object->getType());
161 if ($a_prepare_output)
173 $next_class = $this->ctrl->getNextClass($this);
174 $cmd = $this->ctrl->getCmd();
199 return $this->call_by_reference;
210 $this->creation_mode = $a_mode;
218 return $this->creation_mode;
227 if ($this->call_by_reference)
245 $this->tpl->getStandardTemplate();
247 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
275 if($this->call_by_reference)
279 $class_name = $this->objDefinition->getClassName($obj_type);
280 $class = strtolower(
"ilObj".$class_name.
"GUI");
281 $class_path = $this->ctrl->lookupClassPath($class);
282 include_once($class_path);
283 $class_name = $this->ctrl->getClassForClasspath($class_path);
285 $this->parent_gui_obj =
new $class_name(
"",
$_GET[
"ref_id"],
true,
false);
287 $this->parent_gui_obj->setCreationMode(
true);
288 $this->parent_gui_obj->setTitleAndDescription();
300 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
302 $ilUser->getId() != ANONYMOUS_USER_ID)
309 require_once
'./Services/FileUpload/classes/class.ilFileUploadUtil.php';
324 if (!is_object($this->
object))
334 $this->tpl->setTitle($this->object->getPresentationTitle());
335 $this->tpl->setDescription($this->object->getLongDescription());
337 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
345 $this->lng->txt(
"obj_" . $this->object->getType()));
348 include_once
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
350 $lgui->initItem($this->object->getRefId(), $this->
object->getId());
351 $this->tpl->setAlertProperties($lgui->getAlertProperties());
365 if(!$this->creation_mode && $this->
object)
367 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
369 $ilAccess, $this->object->getType(),
$this->ref_id, $this->
object->getId());
373 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
374 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
375 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
376 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false));
378 $lg = $dispatcher->initHeaderAction();
385 $lg->setContainerObject($this);
389 $lg->enableMultiDownload(
true);
393 include_once
"Services/Notes/classes/class.ilNote.php";
394 if($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
395 $ilAccess->checkAccess(
"edit_permissions",
"", $this->ref_id) ||
398 $lg->enableComments(
true);
401 $lg->enableNotes(
true);
402 $lg->enableTags(
true);
416 if(is_object($a_list_gui))
418 $this->tpl->setHeaderActionMenu($a_list_gui->getHeaderAction());
438 echo
$lg->getHeaderAction();
441 echo $tpl->getOnLoadCodeForAsynch();
451 if ($this->object->getRefId() ==
"")
456 $tpl->setMountWebfolderIcon($this->object->getRefId());
467 $this->
getTabs($this->tabs_gui);
497 $tabs_gui->addTarget(
"view",
498 $this->ctrl->getLinkTarget($this,
"view"), array(
"",
"view"), get_class($this));
504 $tabs_gui->addTarget(
"perm_settings",
505 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
"",
"ilpermissiongui");
508 if ($tree->getSavedNodeData($this->object->getRefId()))
510 $tabs_gui->addTarget(
"trash",
511 $this->ctrl->getLinkTarget($this,
"trash"),
"trash", get_class($this));
530 if (is_array($a_actions))
532 foreach ($a_actions as $name => $lng)
534 $this->actions[$name] = array(
"name" => $name,
"lng" => $lng);
551 if (is_array($a_sub_objects))
553 foreach ($a_sub_objects as $name =>
$options)
555 $this->sub_objects[$name] = array(
"name" => $name,
"max" =>
$options[
"max"]);
560 $this->sub_objects =
"";
574 global $ilLocator,
$tpl;
576 if ($this->omit_locator)
582 if($this->call_by_reference)
587 $ref_id = (
$_GET[
"ref_id"] !=
"")
589 : $this->object->getRefId();
590 $ilLocator->addRepositoryItems($ref_id);
593 if(!$this->creation_mode)
599 if (
$_GET[
"admin_mode"] ==
"" &&
600 strtolower($this->ctrl->getCmdClass()) ==
"ilobjrolegui")
602 $this->ctrl->setParameterByClass(
"ilobjrolegui",
603 "rolf_ref_id",
$_GET[
"rolf_ref_id"]);
604 $this->ctrl->setParameterByClass(
"ilobjrolegui",
605 "obj_id",
$_GET[
"obj_id"]);
606 $ilLocator->addItem($this->lng->txt(
"role"),
607 $this->ctrl->getLinkTargetByClass(array(
"ilpermissiongui",
608 "ilobjrolegui"),
"perm"));
624 $this->omit_locator = $a_omit;
637 if (
$_GET[
"admin_mode"] ==
"settings")
639 $this->ctrl->setParameterByClass(
"ilobjsystemfoldergui",
640 "ref_id", SYSTEM_FOLDER_ID);
641 $ilLocator->addItem($this->lng->txt(
"administration"),
642 $this->ctrl->getLinkTargetByClass(array(
"iladministrationgui",
"ilobjsystemfoldergui"),
"")
644 if ($this->object->getRefId() != SYSTEM_FOLDER_ID && !$a_do_not_add_object)
646 $ilLocator->addItem($this->object->getTitle(),
647 $this->ctrl->getLinkTarget($this,
"view"));
652 $this->ctrl->setParameterByClass(
"iladministrationgui",
654 $this->ctrl->setParameterByClass(
"iladministrationgui",
655 "admin_mode",
"settings");
659 $this->ctrl->clearParametersByClass(
"iladministrationgui");
660 $ilLocator->addAdministrationItems();
673 if(isset(
$_POST[
"mref_id"]))
678 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
682 $this->ctrl->returnToParent($this);
693 $this->ctrl->returnToParent($this);
705 $this->ctrl->returnToParent($this);
721 $this->ctrl->saveParameter($this,
"crtptrefid");
723 $this->ctrl->saveParameter($this,
"crtcb");
727 $ilErr->raiseError($this->lng->txt(
"permission_denied"),$ilErr->MESSAGE);
731 $this->lng->loadLanguageModule($new_type);
732 $this->ctrl->setParameter($this,
"new_type", $new_type);
737 if(
$_GET[
"cpfl"] && isset($forms[self::CFORM_CLONE]))
739 $forms = array(self::CFORM_CLONE => $forms[self::CFORM_CLONE]);
774 foreach($a_forms as $id => $form)
778 unset($a_forms[$id]);
783 if(
sizeof($a_forms) == 1)
785 $form_type = key($a_forms);
786 $a_forms = array_shift($a_forms);
789 if(method_exists($this,
"getCreationFormTitle"))
791 $form_title = $this->getCreationFormTitle($form_type);
792 if ($form_title !=
"")
794 $a_forms->setTitle($form_title);
797 return $a_forms->getHTML();
801 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
806 foreach ($a_forms as $form_type => $cf)
808 $htpl =
new ilTemplate(
"tpl.creation_acc_head.html",
true,
true,
"Services/Object");
812 if(method_exists($this,
"getCreationFormTitle"))
814 $form_title = $this->getCreationFormTitle($form_type);
818 $form_title = $cf->getTitle();
822 $htpl->setVariable(
"TITLE", $this->lng->txt(
"option").
" ".$cnt.
": ".
825 $cf->setTitleIcon(null);
826 $cf->setTableWidth(
"100%");
828 $acc->addItem($htpl->get(), $cf->getHTML());
833 return "<div class='ilCreationFormSection'>".$acc->getHTML().
"</div>";
845 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
847 $form->setTarget(
"_top");
848 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
849 $form->setTitle($this->lng->txt($a_new_type.
"_new"));
855 $ti->setRequired(
true);
866 $form->addCommandButton(
"save", $this->lng->txt($a_new_type.
"_add"));
867 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
881 $lng->loadLanguageModule(
'didactic');
884 $options[
'dtpl_0'] = array($this->lng->txt(
'didactic_default_type'),
886 $this->lng->txt(
'didactic_default_type_info'),
887 $this->lng->txt(
'objs_'.$this->type)
890 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
894 foreach($templates as $template)
896 $options[
"dtpl_".$template->getId()] = array($template->getTitle(),
897 $template->getDescription());
906 $this->lng->txt(
'type'),
912 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
919 $type->setValue(
'dtpl_0');
927 $type->addOption($option);
951 $ilCtrl->redirectByClass(
"ilrepositorygui",
"frameset");
968 $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->
ilias->error_obj->MESSAGE);
971 $this->lng->loadLanguageModule($new_type);
972 $this->ctrl->setParameter($this,
"new_type", $new_type);
975 if ($form->checkInput())
977 $this->ctrl->setParameter($this,
"new_type",
"");
980 $class_name =
"ilObj".$objDefinition->getClassName($new_type);
981 $location = $objDefinition->getLocation($new_type);
982 include_once(
$location.
"/class.".$class_name.
".php");
983 $newObj =
new $class_name();
984 $newObj->setType($new_type);
985 $newObj->setTitle($form->getInput(
"title"));
986 $newObj->setDescription($form->getInput(
"desc"));
995 $newObj->applyDidacticTemplate($dtpl);
1002 $args = func_get_args();
1015 $form->setValuesByPost();
1016 $tpl->setContent($form->getHtml());
1027 $tpl =
$_POST[
"didactic_type"];
1028 if($tpl && substr($tpl, 0, strlen($a_type)+1) == $a_type.
"_")
1030 return (
int)substr($tpl, strlen($a_type)+1);
1044 if(!$a_parent_node_id)
1046 $a_parent_node_id =
$_GET[
"ref_id"];
1052 $a_parent_node_id = (int)$_REQUEST[
"crtptrefid"];
1059 $this->obj_id = $a_obj->
getId();
1060 $this->ref_id = $a_obj->
getRefId();
1063 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1068 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1069 $rbac_log_roles = $rbacreview->getParentRoleIds($this->ref_id,
false);
1074 if($_REQUEST[
"crtcb"])
1077 $class_name =
"ilObj".$objDefinition->getClassName($callback_type).
"GUI";
1078 $location = $objDefinition->getLocation($callback_type);
1079 include_once(
$location.
"/class.".$class_name.
".php");
1080 if (in_array(strtolower($class_name), array(
"ilobjitemgroupgui")))
1082 $callback_obj =
new $class_name((
int)$_REQUEST[
"crtcb"]);
1087 $callback_obj =
new $class_name(null, (
int)$_REQUEST[
"crtcb"],
true,
false);
1089 $callback_obj->afterSaveCallback($a_obj);
1101 $this->ctrl->returnToParent($this);
1111 global
$tpl, $ilTabs;
1115 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->MESSAGE);
1118 $ilTabs->activateTab(
"settings");
1124 $form->setValuesByArray($values);
1129 $tpl->setContent($form->getHTML());
1146 $lng->loadLanguageModule($this->object->getType());
1148 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1150 $form->setFormAction($this->ctrl->getFormAction($this,
"update"));
1151 $form->setTitle($this->lng->txt($this->object->getType().
"_edit"));
1157 $ti->setRequired(
true);
1158 $form->addItem($ti);
1164 $form->addItem($ta);
1168 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
1191 $values[
"title"] = $this->
object->getTitle();
1192 $values[
"desc"] = $this->
object->getLongDescription();
1212 global $ilTabs,
$tpl;
1216 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
1220 if($form->checkInput() &&
1223 $this->
object->setTitle($form->getInput(
"title"));
1224 $this->
object->setDescription($form->getInput(
"desc"));
1226 $this->
object->update();
1233 $ilTabs->activateTab(
"settings");
1234 $form->setValuesByPost();
1235 $tpl->setContent($form->getHtml());
1265 $this->ctrl->redirect($this,
"edit");
1276 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1278 $form->setTarget(
"_top");
1279 $form->setFormAction($this->ctrl->getFormAction($this,
"importFile"));
1280 $form->setTitle($this->lng->txt($a_new_type.
"_import"));
1282 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
1283 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"importfile");
1285 $fi->setRequired(
true);
1286 $form->addItem($fi);
1288 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
1289 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
1303 $parent_id =
$_GET[
"ref_id"];
1310 $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
1313 $this->lng->loadLanguageModule($new_type);
1314 $this->ctrl->setParameter($this,
"new_type", $new_type);
1317 if ($form->checkInput())
1321 if($objDefinition->isContainer($new_type))
1323 include_once
'./Services/Export/classes/class.ilImportContainer.php';
1328 include_once(
"./Services/Export/classes/class.ilImport.php");
1329 $imp =
new ilImport((
int)$parent_id);
1334 $new_id = $imp->importObject(null, $_FILES[
"importfile"][
"tmp_name"],
1335 $_FILES[
"importfile"][
"name"], $new_type);
1339 $this->tmp_import_dir = $imp->getTemporaryImportDir();
1340 if (!$a_catch_errors)
1346 $form->setValuesByPost();
1347 $tpl->setContent($form->getHtml());
1353 $this->ctrl->setParameter($this,
"new_type",
"");
1358 if(!$objDefinition->isContainer($new_type))
1368 if($objDefinition->isContainer($new_type))
1381 $form->setValuesByPost();
1382 $tpl->setContent($form->getHtml());
1393 $this->ctrl->returnToParent($this);
1406 if ($this->formaction[$a_cmd] !=
"")
1408 return $this->formaction[$a_cmd];
1412 return $a_formaction;
1426 $this->formaction[$a_cmd] = $a_formaction;
1438 if ($this->return_location[$a_cmd] !=
"")
1440 return $this->return_location[$a_cmd];
1458 $this->return_location[$a_cmd] = $a_location;
1470 if ($this->target_frame[$a_cmd] !=
"")
1472 return $this->target_frame[$a_cmd];
1474 elseif (!empty($a_target_frame))
1476 return "target=\"".$a_target_frame.
"\"";
1493 $this->target_frame[$a_cmd] =
"target=\"".$a_target_frame.
"\"";
1501 $ilBench->start(
"Explorer",
"setOutput_isVisible");
1504 if ($visible && $a_type ==
'crs') {
1506 if($crs_id = $tree->checkForParentType($a_ref_id,
'crs'))
1513 if(!$tmp_obj->isActivated())
1518 if(($crs_id != $a_ref_id) and $tmp_obj->isArchived())
1526 $ilBench->stop(
"Explorer",
"setOutput_isVisible");
1543 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
1547 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1550 $this->object->getType(),
1551 $this->
object->getRefId(),
1552 $this->
object->getId(), $ilUser->getId());
1555 include_once(
"./Services/Repository/classes/class.ilAdminSubItemsTableGUI.php");
1556 if (!$this->call_by_reference)
1558 $this->ctrl->setParameter($this,
"obj_id", $this->obj_id);
1562 $tpl->setContent($itab->getHTML());
1576 if (
$_GET[
"item_ref_id"] !=
"")
1581 if(is_array(
$_POST[
"id"]))
1583 foreach(
$_POST[
"id"] as $idx => $id)
1585 $_POST[
"id"][$idx] = (int)$id;
1592 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
1594 if (!$ru->showDeleteConfirmation(
$_POST[
"id"], $a_error))
1596 $ilCtrl->returnToParent($this);
1607 if ($this->sub_objects ==
"")
1624 if ($row[
"max"] > 0)
1627 for ($i=0; $i<count($this->data[
"ctrl"]); $i++)
1629 if ($this->data[
"ctrl"][$i][
"type"] == $row[
"name"])
1636 if ($row[
"max"] ==
"" || $count < $row[
"max"])
1638 $subobj[] = $row[
"name"];
1643 if (is_array($subobj))
1648 $this->tpl->setCurrentBlock(
"add_object");
1649 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1650 $this->tpl->setVariable(
"BTN_NAME",
"create");
1651 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
1652 $this->tpl->parseCurrentBlock();
1666 mk(); die(
"ilObjectGUI::getTemplateFile() is deprecated.");
1679 foreach ($a_ref_ids as $id)
1682 $tmp_obj =& $this->
ilias->obj_factory->getInstanceByRefId($id);
1683 $title[] = $tmp_obj->getTitle();
1687 return $title ? $title : array();
1708 $ilToolbar->addButton($a_text, $this->ctrl->getLinkTarget($this, $a_cmd), $a_target);
1720 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1734 case "clipboardObject":
1735 $offset =
$_GET[
"offset"];
1736 $order =
$_GET[
"sort_by"];
1737 $direction =
$_GET[
"sort_order"];
1738 $tbl->disable(
"footer");
1742 $offset =
$_GET[
"offset"];
1743 $order =
$_GET[
"sort_by"];
1744 $direction =
$_GET[
"sort_order"];
1748 $tbl->setOrderColumn($order);
1749 $tbl->setOrderDirection($direction);
1750 $tbl->setOffset($offset);
1752 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1753 $tbl->setData($result_set);
1768 $class_name = $this->objDefinition->getClassName($obj_type);
1769 $class = strtolower(
"ilObj".$class_name.
"GUI");
1770 $this->ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_ref_id);
1771 $this->ctrl->redirectByClass(array(
"ilrepositorygui", $class), $a_cmd);
1786 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
1788 $cp->setType($a_type);
1789 $cp->setTarget(
$_GET[
'ref_id']);
1792 $cp->showSourceSearch($a_tpl_varname);
1796 return $cp->showSourceSearch(null);
1808 include_once(
'./Services/Link/classes/class.ilLink.php');
1809 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
1816 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1826 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1832 $wizard_options->saveOwner($ilUser->getId());
1833 $wizard_options->saveRoot((
int) $_REQUEST[
'clone_source']);
1836 foreach(
$options as $source_id => $option)
1838 $wizard_options->addEntry($source_id,$option);
1840 $wizard_options->read();
1843 $new_obj = $orig->cloneObject((
int)
$_GET[
'ref_id'],$copy_id);
1846 $wizard_options->deleteAll();
1860 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1865 if ($ilCtrl->getNextClass() !=
"ilcolumngui")
1868 return $this->getContent();
1872 if (!$ilCtrl->isAsynch())
1882 $this->html = $ilCtrl->forwardCommand($column_gui);
1889 $this->html = $ilCtrl->forwardCommand($column_gui);
1895 return $this->getContent();
1911 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1921 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
1925 $html = $ilCtrl->forwardCommand($column_gui);
1929 if (!$ilCtrl->isAsynch())
1931 $html = $ilCtrl->getHTML($column_gui);
1943 $column_gui->setRepositoryMode(
true);
1944 $column_gui->setEnableEdit(
false);
1947 $column_gui->setEnableEdit(
true);
1964 if (!is_int(strpos(
$_SERVER[
"PHP_SELF"],
"goto.php")))
1967 if($a_perm ==
"create")
1971 $a_ref_id =
$_GET[
"ref_id"];
1978 if (!is_object($this->
object))
1984 $a_ref_id = $this->
object->getRefId();
1986 $type = $this->
object->getType();
1996 die(
"Permission Denied.");
2014 if($a_perm ==
"create")
2018 $a_ref_id =
$_GET[
"ref_id"];
2020 return $ilAccess->checkAccess($a_perm.
"_".$a_type, $a_cmd, $a_ref_id);
2025 if (!is_object($this->
object))
2031 $a_ref_id = $this->
object->getRefId();
2033 return $ilAccess->checkAccess($a_perm, $a_cmd, $a_ref_id);
2045 global $ilAccess,
$ilErr;
2047 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2049 $_GET[
"cmd"] =
"frameset";
2050 $_GET[
"target"] =
"";
2051 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
2052 $_GET[
"baseClass"] =
"ilRepositoryGUI";
2053 include(
"ilias.php");
2059 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2071 global $ilAccess,
$ilErr;
2073 $_GET[
"cmd"] = $a_cmd;
2074 $_GET[
"target"] =
"";
2075 $_GET[
"ref_id"] = $a_ref_id;
2076 $_GET[
"baseClass"] =
"ilRepositoryGUI";
2077 include(
"ilias.php");
2086 include_once(
"./Services/FileUpload/classes/class.ilFileUploadGUI.php");
2089 $this->tpl->enableDragDropFileUpload($this->ref_id);
2100 method_exists($a_new_obj,
"setRating"))
2102 $a_new_obj->setRating(
true);
redrawHeaderActionObject()
Ajax call: redraw action header only.
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
setSubObjects($a_sub_objects="")
set possible subobjects for this object.
static initFileUpload()
Initializes the file upload and loads the needed javascripts and styles.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
This class represents an option in a radio group.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
addAdminLocatorItems($a_do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded) ...
static getCmdSide()
Get Column Side of Current Command.
Base class for ILIAS Exception handling.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
setTargetFrame($a_cmd, $a_target_frame)
set specific target frame for command
const PEAR_ERROR_CALLBACK
getTitlesByRefId($a_ref_ids)
get Titles of objects this method is used for error messages in methods cut/copy/paste ...
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
enableDragDropFileUpload()
Enables the file upload into this object by dropping files.
TableGUI class for sub items listed in repository administration.
cancelCreation()
cancel create action and go back to repository parent
GUI class for the workflow of copying objects.
initCreationForms($a_new_type)
Init creation froms.
const TITLE_LENGTH
max length of object title
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="")
standard implementation for tables use 'from' variable use different initial setting of table ...
Class ilObject Basic functions for all objects.
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
__showButton($a_cmd, $a_text, $a_target='')
setReturnLocation($a_cmd, $a_location)
set specific return location for command
static get($a_var)
Get a value.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
setFormAction($a_cmd, $a_formaction)
set specific form action for command
static set($a_var, $a_val)
Set a value.
static _isActive()
Static getter.
cancelObject($in_rep=false)
cancel action and go back to previous page public
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
static _lookupTitle($a_id)
lookup object title
setActions($a_actions="")
set possible actions for objects in list.
setCreationMode($a_mode=true)
if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! ...
confirmedDeleteObject()
confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
viewObject()
list childs of current object
createObject()
create new object form
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
cloneAllObject()
Clone single (not container object) Method is overwritten in ilContainerGUI.
fillCloneTemplate($a_tpl_varname, $a_type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
addExternalEditFormCustom(ilPropertyFormGUI $a_form)
cancelDeleteObject()
cancel deletion of object
static hasAutoRating($a_type, $a_ref_id)
Check if auto rating is active for parent group/course.
getCenterColumnHTML()
Get center column.
updateCustom(ilPropertyFormGUI $a_form)
Insert custom update form values into object.
createReference()
creates reference for object
initImportForm($a_new_type)
Init object import form.
getCreationFormsHTML(array $a_forms)
Get HTML for creation forms (accordion)
isVisible($a_ref_id, $a_type)
static _getInstance($a_copy_id)
Get instance of copy wizard options.
if(!is_array($argv)) $options
& executeCommand()
execute command
getId()
get object id public
getTargetFrame($a_cmd, $a_target_frame="")
get target frame for command (command is method name without "Object", e.g.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
Column user interface class.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
getTabs(&$tabs_gui)
get tabs abstract method.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
getAdminTabs(&$tabs_gui)
administration tabs show only permissions and trash folder
special template class to simplify handling of ITX/PEAR
omitLocator($a_omit=true)
getTemplateFile($a_cmd, $a_type="")
get a template blockfile format: tpl.
Repository GUI Utilities.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
static infoPanel($a_keep=true)
redirection script todo: (a better solution should control the processing via a xml file) ...
importFileObject($parent_id=null, $a_catch_errors=true)
Import.
static _allocateCopyId()
Allocate a copy for further entries.
static clear($a_var)
Unset a value.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
initCreateForm($a_new_type)
Init object creation form.
setTitleAndDescription()
called by prepare output
putInTree($a_parent_ref)
maybe this method should be in tree object!?
getType()
get object type public
initEditForm()
Init object edit form.
prepareOutput()
prepare output
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const COPY_WIZARD_NEEDS_PAGE
getEditFormValues()
Get values for edit form.
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
& _getListGUIByType($a_type)
_recordReadEvent($a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
addDidacticTemplateOptions(array &$a_options)
Add custom templates.
validateCustom(ilPropertyFormGUI $a_form)
Validate custom values (if not possible with checkInput())
withReferences()
determines wether objects are referenced or not (got ref ids or not)
static commentsActivated($a_rep_obj_id, $a_obj_id, $a_obj_type)
Are comments activated for object?
static getScreenMode()
Get Screen Mode for current command.
getRightColumnHTML()
Display right column.
static getInstanceByObjectType($a_obj_type)
Get instance by obj type.
setColumnSettings($column_gui)
May be overwritten in subclasses.
handleAutoRating(ilObject $a_new_obj)
Activate rating automatically if parent container setting.
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
static isUploadAllowed($a_ref_id, $a_type="")
Determines whether files can be uploaded to the object with the specified reference id...
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
showPossibleSubObjects()
show possible subobjects (pulldown menu)
This class represents a text area property in a property form.
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
insertHeaderAction($a_list_gui)
Insert header action into main template.
getCreationMode()
get creation mode
getRefId()
get reference id public
updateObject()
updates object entry in object_data
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
deleteObject($a_error=false)
Display deletion confirmation screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
setTabs()
set admin tabs public
update()
update object in db
afterUpdate()
Post (successful) object update hook.
static redirect($a_script)
http redirect to other script
Accordion user interface class.
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.
addHeaderAction()
Add header action menu.
setPermissions($a_parent_ref)
set permissions of object
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Class ilCommonActionDispatcherGUI.
setSubObject($a_sub_obj_type, $a_sub_obj_id)
Set sub object attributes.
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
setAdminTabs()
set admin tabs public
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded) ...
afterImport(ilObject $a_new_object)
Post (successful) object import hook.