101 function __construct($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
true)
108 $this->tabs_gui = $ilTabs;
128 if (!$a_call_by_reference)
133 $this->ctrl->saveParameter($this,
$params);
137 $this->formaction =
array();
138 $this->return_location =
array();
139 $this->target_frame =
array();
141 $this->sub_objects =
"";
143 $this->
data = $a_data;
145 $this->call_by_reference = $a_call_by_reference;
146 $this->prepare_output = $a_prepare_output;
147 $this->creation_mode =
false;
149 $this->ref_id = ($this->call_by_reference) ? $this->
id :
$_GET[
"ref_id"];
150 $this->obj_id = ($this->call_by_reference) ?
$_GET[
"obj_id"] : $this->
id;
154 $this->link_params =
"ref_id=".$this->ref_id;
161 if (is_object($this->
object))
163 if ($this->call_by_reference && $this->ref_id ==
$_GET[
"ref_id"])
165 $this->ctrl->setContext($this->
object->getId(),
166 $this->
object->getType());
174 if ($a_prepare_output)
186 $next_class = $this->ctrl->getNextClass($this);
187 $cmd = $this->ctrl->getCmd();
212 return $this->call_by_reference;
223 $this->creation_mode = $a_mode;
231 return $this->creation_mode;
240 if ($this->call_by_reference)
258 $this->tpl->getStandardTemplate();
260 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
288 if($this->call_by_reference)
292 $class_name = $this->objDefinition->getClassName($obj_type);
293 $class = strtolower(
"ilObj".$class_name.
"GUI");
294 $class_path = $this->ctrl->lookupClassPath($class);
295 include_once($class_path);
296 $class_name = $this->ctrl->getClassForClasspath($class_path);
298 $this->parent_gui_obj =
new $class_name(
"",
$_GET[
"ref_id"],
true,
false);
300 $this->parent_gui_obj->setCreationMode(
true);
301 $this->parent_gui_obj->setTitleAndDescription();
313 if ($ilUser->getId() != ANONYMOUS_USER_ID)
315 require_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
324 require_once
'./Services/FileUpload/classes/class.ilFileUploadUtil.php';
339 if (!is_object($this->
object))
341 if ((
int) $_REQUEST[
"crtptrefid"] > 0)
349 $this->tpl->setTitle($this->
object->getPresentationTitle());
350 $this->tpl->setDescription($this->
object->getLongDescription());
352 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
360 $this->lng->txt(
"obj_" . $this->object->getType()));
363 include_once
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
365 $lgui->initItem($this->
object->getRefId(), $this->
object->getId());
366 $this->tpl->setAlertProperties($lgui->getAlertProperties());
380 if(!$this->creation_mode && $this->
object)
382 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
388 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
389 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
390 $this->ctrl->getLinkTargetByClass(
array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
391 $this->ctrl->getLinkTargetByClass(
array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false));
393 $lg = $dispatcher->initHeaderAction();
400 $lg->setContainerObject($this);
404 $lg->enableMultiDownload(
true);
408 include_once
"Services/Notes/classes/class.ilNote.php";
409 if($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
410 $ilAccess->checkAccess(
"edit_permissions",
"", $this->ref_id) ||
413 $lg->enableComments(
true);
416 $lg->enableNotes(
true);
417 $lg->enableTags(
true);
431 if(is_object($a_list_gui))
433 $this->tpl->setHeaderActionMenu($a_list_gui->getHeaderAction());
456 echo $tpl->getOnLoadCodeForAsynch();
466 if ($this->
object->getRefId() ==
"")
471 $tpl->setMountWebfolderIcon($this->
object->getRefId());
512 $this->tabs_gui->addTarget(
"view",
513 $this->ctrl->getLinkTarget($this,
"view"),
array(
"",
"view"), get_class($this));
519 $this->tabs_gui->addTarget(
"perm_settings",
520 $this->ctrl->getLinkTargetByClass(
array(get_class($this),
'ilpermissiongui'),
"perm"),
"",
"ilpermissiongui");
523 if ($tree->getSavedNodeData($this->object->getRefId()))
525 $this->tabs_gui->addTarget(
"trash",
526 $this->ctrl->getLinkTarget($this,
"trash"),
"trash", get_class($this));
545 if (is_array($a_actions))
547 foreach ($a_actions as $name => $lng)
549 $this->actions[$name] =
array(
"name" => $name,
"lng" => $lng);
566 if (is_array($a_sub_objects))
568 foreach ($a_sub_objects as $name =>
$options)
570 $this->sub_objects[$name] =
array(
"name" => $name,
"max" =>
$options[
"max"]);
575 $this->sub_objects =
"";
589 global $ilLocator,
$tpl;
591 if ($this->omit_locator)
597 if($this->call_by_reference)
602 $ref_id = (
$_GET[
"ref_id"] !=
"")
604 : $this->
object->getRefId();
605 $ilLocator->addRepositoryItems($ref_id);
608 if(!$this->creation_mode)
614 if (
$_GET[
"admin_mode"] ==
"" &&
615 strtolower($this->ctrl->getCmdClass()) ==
"ilobjrolegui")
617 $this->ctrl->setParameterByClass(
"ilobjrolegui",
618 "rolf_ref_id",
$_GET[
"rolf_ref_id"]);
619 $this->ctrl->setParameterByClass(
"ilobjrolegui",
620 "obj_id",
$_GET[
"obj_id"]);
621 $ilLocator->addItem($this->lng->txt(
"role"),
622 $this->ctrl->getLinkTargetByClass(
array(
"ilpermissiongui",
623 "ilobjrolegui"),
"perm"));
639 $this->omit_locator = $a_omit;
652 if (
$_GET[
"admin_mode"] ==
"settings")
654 $this->ctrl->setParameterByClass(
"ilobjsystemfoldergui",
655 "ref_id", SYSTEM_FOLDER_ID);
656 $ilLocator->addItem($this->lng->txt(
"administration"),
657 $this->ctrl->getLinkTargetByClass(
array(
"iladministrationgui",
"ilobjsystemfoldergui"),
"")
659 if ($this->
object && ($this->
object->getRefId() != SYSTEM_FOLDER_ID && !$a_do_not_add_object))
661 $ilLocator->addItem($this->
object->getTitle(),
662 $this->ctrl->getLinkTarget($this,
"view"));
667 $this->ctrl->setParameterByClass(
"iladministrationgui",
669 $this->ctrl->setParameterByClass(
"iladministrationgui",
670 "admin_mode",
"settings");
674 $this->ctrl->clearParametersByClass(
"iladministrationgui");
675 $ilLocator->addAdministrationItems();
688 if(isset(
$_POST[
"mref_id"]))
693 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
697 $this->ctrl->returnToParent($this);
708 $this->ctrl->returnToParent($this);
720 $this->ctrl->returnToParent($this);
732 $new_type = $_REQUEST[
"new_type"];
736 $this->ctrl->saveParameter($this,
"crtptrefid");
738 $this->ctrl->saveParameter($this,
"crtcb");
742 $ilErr->raiseError($this->lng->txt(
"permission_denied"),$ilErr->MESSAGE);
746 $this->lng->loadLanguageModule($new_type);
747 $this->ctrl->setParameter($this,
"new_type", $new_type);
752 if(
$_GET[
"cpfl"] && isset($forms[self::CFORM_CLONE]))
754 $forms =
array(self::CFORM_CLONE => $forms[self::CFORM_CLONE]);
789 foreach($a_forms as $id => $form)
793 unset($a_forms[$id]);
798 if(
sizeof($a_forms) == 1)
800 $form_type = key($a_forms);
801 $a_forms = array_shift($a_forms);
804 if(method_exists($this,
"getCreationFormTitle"))
806 $form_title = $this->getCreationFormTitle($form_type);
807 if ($form_title !=
"")
809 $a_forms->setTitle($form_title);
812 return $a_forms->getHTML();
816 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
821 foreach ($a_forms as $form_type => $cf)
823 $htpl =
new ilTemplate(
"tpl.creation_acc_head.html",
true,
true,
"Services/Object");
827 if(method_exists($this,
"getCreationFormTitle"))
829 $form_title = $this->getCreationFormTitle($form_type);
833 $form_title = $cf->getTitle();
837 $htpl->setVariable(
"TITLE", $this->lng->txt(
"option").
" ".$cnt.
": ".
840 $cf->setTitleIcon(null);
841 $cf->setTableWidth(
"100%");
843 $acc->addItem($htpl->get(), $cf->getHTML());
848 return "<div class='ilCreationFormSection'>".$acc->getHTML().
"</div>";
860 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
862 $form->setTarget(
"_top");
863 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
864 $form->setTitle($this->lng->txt($a_new_type.
"_new"));
870 $ti->setRequired(
true);
881 $form->addCommandButton(
"save", $this->lng->txt($a_new_type.
"_add"));
882 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
896 $lng->loadLanguageModule(
'didactic');
897 $existing_exclusive =
false;
899 $options[
'dtpl_0'] =
array($this->lng->txt(
'didactic_default_type'),
901 $this->lng->txt(
'didactic_default_type_info'),
902 $this->lng->txt(
'objs_'.$this->type)
905 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
909 foreach($templates as $template)
911 if($template->isEffective(
$_GET[
"ref_id"]))
914 $template->getPresentationTitle(),
915 $template->getPresentationDescription()
918 if($template->isExclusive())
920 $existing_exclusive =
true;
932 $this->lng->txt(
'type'),
938 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
939 $value =
'dtpl_'.ilDidacticTemplateObjSettings::lookupTemplateId($this->
object->getRefId());
943 if(!in_array($value, array_keys(
$options)) || ($existing_exclusive && $value ==
"dtpl_0"))
951 if($existing_exclusive)
955 $type->setValue($keys[1]);
959 $type->setValue(
'dtpl_0');
972 $option->setDisabled(
true);
975 $type->addOption($option);
999 $ilCtrl->redirectByClass(
"ilrepositorygui",
"frameset");
1011 $new_type = $_REQUEST[
"new_type"];
1016 $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->
ilias->error_obj->MESSAGE);
1019 $this->lng->loadLanguageModule($new_type);
1020 $this->ctrl->setParameter($this,
"new_type", $new_type);
1023 if ($form->checkInput())
1025 $this->ctrl->setParameter($this,
"new_type",
"");
1028 $class_name =
"ilObj".$objDefinition->getClassName($new_type);
1029 $location = $objDefinition->getLocation($new_type);
1030 include_once(
$location.
"/class.".$class_name.
".php");
1031 $newObj =
new $class_name();
1032 $newObj->setType($new_type);
1033 $newObj->setTitle($form->getInput(
"title"));
1034 $newObj->setDescription($form->getInput(
"desc"));
1043 $newObj->applyDidacticTemplate($dtpl);
1050 $args = func_get_args();
1063 $form->setValuesByPost();
1064 $tpl->setContent($form->getHtml());
1075 $tpl =
$_POST[
"didactic_type"];
1078 return (
int)substr($tpl, strlen(
$a_type)+1);
1093 if(!$a_parent_node_id)
1095 $a_parent_node_id =
$_GET[
"ref_id"];
1099 if((
int)$_REQUEST[
"crtptrefid"])
1101 $a_parent_node_id = (int)$_REQUEST[
"crtptrefid"];
1108 $this->obj_id = $a_obj->
getId();
1109 $this->ref_id = $a_obj->
getRefId();
1112 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1117 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1118 $rbac_log_roles = $rbacreview->getParentRoleIds($this->ref_id,
false);
1123 if($_REQUEST[
"crtcb"])
1126 $class_name =
"ilObj".$objDefinition->getClassName($callback_type).
"GUI";
1127 $location = $objDefinition->getLocation($callback_type);
1128 include_once(
$location.
"/class.".$class_name.
".php");
1129 if (in_array(strtolower($class_name),
array(
"ilobjitemgroupgui")))
1131 $callback_obj =
new $class_name((
int)$_REQUEST[
"crtcb"]);
1136 $callback_obj =
new $class_name(null, (
int)$_REQUEST[
"crtcb"],
true,
false);
1138 $callback_obj->afterSaveCallback($a_obj);
1150 $this->ctrl->returnToParent($this);
1160 global
$tpl, $ilTabs;
1164 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->MESSAGE);
1167 $ilTabs->activateTab(
"settings");
1173 $form->setValuesByArray($values);
1178 $tpl->setContent($form->getHTML());
1195 $lng->loadLanguageModule($this->
object->getType());
1197 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1199 $form->setFormAction($this->ctrl->getFormAction($this,
"update"));
1200 $form->setTitle($this->lng->txt($this->object->getType().
"_edit"));
1206 $ti->setRequired(
true);
1207 $form->addItem($ti);
1213 $form->addItem($ta);
1217 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
1240 $values[
"title"] = $this->
object->getTitle();
1241 $values[
"desc"] = $this->
object->getLongDescription();
1261 global $ilTabs,
$tpl;
1265 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
1269 if($form->checkInput() &&
1272 $this->
object->setTitle($form->getInput(
"title"));
1273 $this->
object->setDescription($form->getInput(
"desc"));
1275 $this->
object->update();
1282 $ilTabs->activateTab(
"settings");
1283 $form->setValuesByPost();
1284 $tpl->setContent($form->getHtml());
1314 $this->ctrl->redirect($this,
"edit");
1325 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1327 $form->setTarget(
"_top");
1328 $form->setFormAction($this->ctrl->getFormAction($this,
"importFile"));
1329 $form->setTitle($this->lng->txt($a_new_type.
"_import"));
1331 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
1332 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"importfile");
1334 $fi->setRequired(
true);
1335 $form->addItem($fi);
1337 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
1338 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
1352 $parent_id =
$_GET[
"ref_id"];
1354 $new_type = $_REQUEST[
"new_type"];
1359 $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
1362 $this->lng->loadLanguageModule($new_type);
1363 $this->ctrl->setParameter($this,
"new_type", $new_type);
1366 if ($form->checkInput())
1370 if($objDefinition->isContainer($new_type))
1372 include_once
'./Services/Export/classes/class.ilImportContainer.php';
1377 include_once(
"./Services/Export/classes/class.ilImport.php");
1378 $imp =
new ilImport((
int)$parent_id);
1383 $new_id = $imp->importObject(null, $_FILES[
"importfile"][
"tmp_name"],
1384 $_FILES[
"importfile"][
"name"], $new_type);
1388 $this->tmp_import_dir = $imp->getTemporaryImportDir();
1389 if (!$a_catch_errors)
1395 $form->setValuesByPost();
1396 $tpl->setContent($form->getHtml());
1402 $this->ctrl->setParameter($this,
"new_type",
"");
1407 if(!$objDefinition->isContainer($new_type))
1417 if($objDefinition->isContainer($new_type))
1430 $form->setValuesByPost();
1431 $tpl->setContent($form->getHtml());
1442 $this->ctrl->returnToParent($this);
1455 if ($this->formaction[$a_cmd] !=
"")
1457 return $this->formaction[$a_cmd];
1461 return $a_formaction;
1475 $this->formaction[$a_cmd] = $a_formaction;
1487 if ($this->return_location[$a_cmd] !=
"")
1489 return $this->return_location[$a_cmd];
1507 $this->return_location[$a_cmd] = $a_location;
1519 if ($this->target_frame[$a_cmd] !=
"")
1521 return $this->target_frame[$a_cmd];
1523 elseif (!empty($a_target_frame))
1525 return "target=\"".$a_target_frame.
"\"";
1542 $this->target_frame[$a_cmd] =
"target=\"".$a_target_frame.
"\"";
1550 $ilBench->start(
"Explorer",
"setOutput_isVisible");
1553 if ($visible &&
$a_type ==
'crs') {
1555 if($crs_id = $tree->checkForParentType($a_ref_id,
'crs'))
1562 if(!$tmp_obj->isActivated())
1571 $ilBench->stop(
"Explorer",
"setOutput_isVisible");
1588 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
1592 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1595 $this->
object->getType(),
1596 $this->
object->getRefId(),
1597 $this->
object->getId(), $ilUser->getId());
1600 include_once(
"./Services/Repository/classes/class.ilAdminSubItemsTableGUI.php");
1601 if (!$this->call_by_reference)
1603 $this->ctrl->setParameter($this,
"obj_id", $this->obj_id);
1607 $tpl->setContent($itab->getHTML());
1621 if (
$_GET[
"item_ref_id"] !=
"")
1626 if(is_array(
$_POST[
"id"]))
1628 foreach(
$_POST[
"id"] as $idx => $id)
1630 $_POST[
"id"][$idx] = (int)$id;
1637 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
1639 if (!$ru->showDeleteConfirmation(
$_POST[
"id"], $a_error))
1641 $ilCtrl->returnToParent($this);
1652 if ($this->sub_objects ==
"")
1669 if ($row[
"max"] > 0)
1672 for ($i=0; $i<count($this->
data[
"ctrl"]); $i++)
1674 if ($this->
data[
"ctrl"][$i][
"type"] == $row[
"name"])
1681 if ($row[
"max"] ==
"" || $count < $row[
"max"])
1683 $subobj[] = $row[
"name"];
1688 if (is_array($subobj))
1693 $this->tpl->setCurrentBlock(
"add_object");
1694 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1695 $this->tpl->setVariable(
"BTN_NAME",
"create");
1696 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
1697 $this->tpl->parseCurrentBlock();
1711 mk(); die(
"ilObjectGUI::getTemplateFile() is deprecated.");
1732 $ilToolbar->addButton($a_text, $this->ctrl->getLinkTarget($this, $a_cmd), $a_target);
1744 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1758 case "clipboardObject":
1759 $offset =
$_GET[
"offset"];
1760 $order =
$_GET[
"sort_by"];
1761 $direction =
$_GET[
"sort_order"];
1762 $tbl->disable(
"footer");
1766 $offset =
$_GET[
"offset"];
1767 $order =
$_GET[
"sort_by"];
1768 $direction =
$_GET[
"sort_order"];
1772 $tbl->setOrderColumn($order);
1773 $tbl->setOrderDirection($direction);
1774 $tbl->setOffset($offset);
1776 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1777 $tbl->setData($result_set);
1792 $class_name = $this->objDefinition->getClassName($obj_type);
1793 $class = strtolower(
"ilObj".$class_name.
"GUI");
1794 $this->ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_ref_id);
1795 $this->ctrl->redirectByClass(
array(
"ilrepositorygui", $class), $a_cmd);
1810 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
1813 $cp->setTarget(
$_GET[
'ref_id']);
1816 $cp->showSourceSearch($a_tpl_varname);
1820 return $cp->showSourceSearch(null);
1832 include_once(
'./Services/Link/classes/class.ilLink.php');
1833 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
1837 $new_type = $_REQUEST[
'new_type'];
1840 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1842 if(!(
int) $_REQUEST[
'clone_source'])
1850 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1856 $wizard_options->saveOwner($ilUser->getId());
1857 $wizard_options->saveRoot((
int) $_REQUEST[
'clone_source']);
1860 foreach(
$options as $source_id => $option)
1862 $wizard_options->addEntry($source_id,$option);
1864 $wizard_options->read();
1867 $new_obj =
$orig->cloneObject((
int)
$_GET[
'ref_id'],$copy_id);
1870 $wizard_options->deleteAll();
1884 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1889 if ($ilCtrl->getNextClass() !=
"ilcolumngui")
1892 return $this->getContent();
1896 if (!$ilCtrl->isAsynch())
1906 $this->html = $ilCtrl->forwardCommand($column_gui);
1913 $this->html = $ilCtrl->forwardCommand($column_gui);
1919 return $this->getContent();
1935 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1945 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
1949 $html = $ilCtrl->forwardCommand($column_gui);
1953 if (!$ilCtrl->isAsynch())
1955 $html = $ilCtrl->getHTML($column_gui);
1989 if (!is_int(strpos(
$_SERVER[
"PHP_SELF"],
"goto.php")))
1992 if($a_perm ==
"create")
1996 $a_ref_id =
$_GET[
"ref_id"];
2003 if (!is_object($this->
object))
2009 $a_ref_id = $this->
object->getRefId();
2011 $type = $this->
object->getType();
2016 include_once
"Services/Object/exceptions/class.ilObjectException.php";
2027 die(
"Permission Denied.");
2045 if($a_perm ==
"create")
2049 $a_ref_id =
$_GET[
"ref_id"];
2051 return $ilAccess->checkAccess($a_perm.
"_".
$a_type, $a_cmd, $a_ref_id);
2056 if (!is_object($this->
object))
2062 $a_ref_id = $this->
object->getRefId();
2064 return $ilAccess->checkAccess($a_perm, $a_cmd, $a_ref_id);
2078 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2080 $_GET[
"cmd"] =
"frameset";
2081 $_GET[
"target"] =
"";
2082 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
2083 $_GET[
"baseClass"] =
"ilRepositoryGUI";
2084 include(
"ilias.php");
2090 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2102 global $ilAccess,
$ilErr;
2104 $_GET[
"cmd"] = $a_cmd;
2105 $_GET[
"target"] =
"";
2106 $_GET[
"ref_id"] = $a_ref_id;
2107 $_GET[
"baseClass"] =
"ilRepositoryGUI";
2108 include(
"ilias.php");
2117 include_once(
"./Services/FileUpload/classes/class.ilFileUploadGUI.php");
2120 $this->tpl->enableDragDropFileUpload($this->ref_id);
2131 method_exists($a_new_obj,
"setRating"))
2133 $a_new_obj->setRating(
true);
redrawHeaderActionObject()
Ajax call: redraw action header only.
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']
getTabs()
get tabs abstract method.
setTargetFrame($a_cmd, $a_target_frame)
set specific target frame for command
const PEAR_ERROR_CALLBACK
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.
cancelObject()
cancel action and go back to previous page public
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.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
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
Base exception class for object service.
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.
setEnableEdit($a_enableedit)
Set EnableEdit.
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
static _isActive()
Static getter.
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 gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
for($col=0; $col< 50; $col++) $d
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.
prepareOutput($a_show_subobjects=true)
prepare output
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
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.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
setRepositoryMode($a_repositorymode)
Set RepositoryMode.
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 _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.
static clear($a_var)
Unset a value.
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.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
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.
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.
handleAutoRating(ilObject $a_new_obj)
Activate rating automatically if parent container setting.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
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)
Create new PHPExcel object
obj_idprivate
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.
setColumnSettings(ilColumnGUI $column_gui)
May be overwritten in subclasses.
getCreationMode()
get creation mode
getRefId()
get reference id public
updateObject()
updates object entry in object_data
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
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.
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.
getAdminTabs()
administration tabs show only permissions and trash folder
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.
executeCommand()
execute command
setSubObject($a_sub_obj_type, $a_sub_obj_id)
Set sub object attributes.
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.