133 public function __construct($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
true)
137 $this->locator = $DIC[
"ilLocator"];
138 $this->
user = $DIC->user();
139 $this->access = $DIC->access();
141 $this->rbacreview = $DIC->rbac()->review();
142 $this->toolbar = $DIC->toolbar();
143 $this->object_service = $DIC->object();
146 $tree = $DIC->repositoryTree();
149 $lng = $DIC->language();
150 $ilTabs = $DIC->tabs();
152 $this->
ilias = $DIC[
"ilias"];
157 $this->tabs_gui = $ilTabs;
173 if (!$a_call_by_reference) {
174 $params = array(
"ref_id",
"obj_id");
177 $this->ctrl->saveParameter($this,
$params);
181 $this->formaction = array();
182 $this->return_location = array();
183 $this->target_frame = array();
185 $this->sub_objects =
"";
187 $this->
data = $a_data;
189 $this->call_by_reference = $a_call_by_reference;
190 $this->prepare_output = $a_prepare_output;
191 $this->creation_mode =
false;
193 $this->ref_id = ($this->call_by_reference) ? $this->
id :
$_GET[
"ref_id"];
194 $this->obj_id = ($this->call_by_reference) ?
$_GET[
"obj_id"] : $this->
id;
196 if ($this->
id != 0) {
204 if (is_object($this->
object)) {
205 if ($this->call_by_reference && $this->ref_id ==
$_GET[
"ref_id"]) {
206 $this->ctrl->setContext(
207 $this->object->getId(),
208 $this->
object->getType()
214 if ($a_prepare_output) {
234 $next_class = $this->ctrl->getNextClass($this);
235 $cmd = $this->ctrl->getCmd();
237 switch ($next_class) {
258 return $this->call_by_reference;
269 $this->creation_mode = $a_mode;
277 return $this->creation_mode;
284 if ($this->
id != 0) {
285 if ($this->call_by_reference) {
302 $this->tpl->getStandardTemplate();
304 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
329 if ($this->call_by_reference) {
332 $class_name = $this->objDefinition->getClassName($obj_type);
333 $class = strtolower(
"ilObj" . $class_name .
"GUI");
334 $class_path = $this->ctrl->lookupClassPath($class);
335 include_once($class_path);
336 $class_name = $this->ctrl->getClassForClasspath($class_path);
338 $this->parent_gui_obj =
new $class_name(
"",
$_GET[
"ref_id"],
true,
false);
340 $this->parent_gui_obj->setCreationMode(
true);
341 $this->parent_gui_obj->setTitleAndDescription();
351 if (
$ilUser->getId() != ANONYMOUS_USER_ID) {
352 require_once(
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
360 require_once
'./Services/FileUpload/classes/class.ilFileUploadUtil.php';
374 if (!is_object($this->
object)) {
375 if ((
int) $_REQUEST[
"crtptrefid"] > 0) {
378 $this->tpl->setTitleIcon(ilObject::_getIcon($cr_obj_id));
382 $this->tpl->setTitle($this->object->getPresentationTitle());
383 $this->tpl->setDescription($this->object->getLongDescription());
385 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
387 $this->tpl->setTitleIcon(ilObject::_getIcon(
"",
"big", $this->object->getType()));
389 $this->tpl->setTitleIcon(
390 ilObject::_getIcon(
"",
"big", $this->object->getType()),
391 $this->lng->txt(
"obj_" . $this->object->getType())
395 include_once
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
397 $lgui->initItem($this->object->getRefId(), $this->
object->getId());
398 $this->tpl->setAlertProperties($lgui->getAlertProperties());
412 if (!$this->creation_mode && $this->
object) {
413 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
417 $this->object->getType(),
419 $this->
object->getId()
424 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
425 ilObjectListGUI::prepareJSLinks(
426 $this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
427 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
428 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false)
431 $lg = $dispatcher->initHeaderAction();
433 if (is_object($lg)) {
436 $lg->setContainerObject($this);
440 $lg->enableMultiDownload(
true);
444 include_once
"Services/Notes/classes/class.ilNote.php";
445 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
446 $ilAccess->checkAccess(
"edit_permissions",
"", $this->ref_id) ||
448 $lg->enableComments(
true);
451 $lg->enableNotes(
true);
452 $lg->enableTags(
true);
470 if (is_object($a_list_gui)) {
471 $this->tpl->setHeaderActionMenu($a_list_gui->getHeaderAction());
494 echo $tpl->getOnLoadCodeForAsynch();
506 if ($this->object->getRefId() ==
"") {
510 $tpl->setMountWebfolderIcon($this->object->getRefId());
550 $this->tabs_gui->addTarget(
552 $this->ctrl->getLinkTarget($this,
"view"),
559 $this->tabs_gui->addTarget(
561 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
567 if (
$tree->getSavedNodeData($this->object->getRefId())) {
568 $this->tabs_gui->addTarget(
570 $this->ctrl->getLinkTarget($this,
"trash"),
592 if (is_array($a_actions)) {
609 if (is_array($a_sub_objects)) {
614 $this->sub_objects =
"";
631 if ($this->omit_locator) {
636 if ($this->call_by_reference) {
642 : $this->object->getRefId();
643 $ilLocator->addRepositoryItems(
$ref_id);
646 if (!$this->creation_mode) {
663 $this->omit_locator = $a_omit;
676 if (
$_GET[
"admin_mode"] ==
"settings") {
677 $this->ctrl->setParameterByClass(
678 "ilobjsystemfoldergui",
683 $this->lng->txt(
"administration"),
684 $this->ctrl->getLinkTargetByClass(array(
"iladministrationgui",
"ilobjsystemfoldergui"),
"")
686 if ($this->
object && ($this->object->getRefId() != SYSTEM_FOLDER_ID && !$a_do_not_add_object)) {
688 $this->object->getTitle(),
689 $this->ctrl->getLinkTarget($this,
"view")
693 $this->ctrl->setParameterByClass(
694 "iladministrationgui",
698 $this->ctrl->setParameterByClass(
699 "iladministrationgui",
706 $this->ctrl->clearParametersByClass(
"iladministrationgui");
707 $ilLocator->addAdministrationItems();
717 if (isset(
$_POST[
"mref_id"])) {
721 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
725 $this->ctrl->returnToParent($this);
736 $this->ctrl->returnToParent($this);
748 $this->ctrl->returnToParent($this);
761 $new_type = $_REQUEST[
"new_type"];
765 $this->ctrl->saveParameter($this,
"crtptrefid");
767 $this->ctrl->saveParameter($this,
"crtcb");
770 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
772 $this->lng->loadLanguageModule($new_type);
773 $this->ctrl->setParameter($this,
"new_type", $new_type);
778 if (
$_GET[
"cpfl"] && isset($forms[self::CFORM_CLONE])) {
779 $forms = array(self::CFORM_CLONE => $forms[self::CFORM_CLONE]);
814 foreach ($a_forms as
$id =>
$form) {
816 unset($a_forms[
$id]);
821 if (
sizeof($a_forms) == 1) {
822 $form_type = key($a_forms);
823 $a_forms = array_shift($a_forms);
826 if (method_exists($this,
"getCreationFormTitle")) {
827 $form_title = $this->getCreationFormTitle($form_type);
828 if ($form_title !=
"") {
829 $a_forms->setTitle($form_title);
832 return $a_forms->getHTML();
834 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
839 foreach ($a_forms as $form_type => $cf) {
840 $htpl =
new ilTemplate(
"tpl.creation_acc_head.html",
true,
true,
"Services/Object");
844 if (method_exists($this,
"getCreationFormTitle")) {
845 $form_title = $this->getCreationFormTitle($form_type);
848 $form_title = $cf->getTitle();
852 $htpl->setVariable(
"TITLE", $this->lng->txt(
"option") .
" " . $cnt .
": " .
855 $cf->setTitleIcon(null);
856 $cf->setTableWidth(
"100%");
858 $acc->addItem($htpl->get(), $cf->getHTML());
863 return "<div class='ilCreationFormSection'>" . $acc->getHTML() .
"</div>";
875 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
877 $form->setTarget(
"_top");
878 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
879 $form->setTitle($this->lng->txt($a_new_type .
"_new"));
885 $ti->setRequired(
true);
896 $form->addCommandButton(
"save", $this->lng->txt($a_new_type .
"_add"));
897 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
911 $lng->loadLanguageModule(
'didactic');
912 $existing_exclusive =
false;
914 $options[
'dtpl_0'] = array($this->lng->txt(
'didactic_default_type'),
916 $this->lng->txt(
'didactic_default_type_info'),
917 $this->lng->txt(
'objs_' . $this->type)
920 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
924 if ($template->isEffective(
$_GET[
"ref_id"])) {
925 $options[
"dtpl_" . $template->getId()] = array(
926 $template->getPresentationTitle(),
927 $template->getPresentationDescription()
930 if ($template->isExclusive()) {
931 $existing_exclusive =
true;
941 $this->lng->txt(
'type'),
946 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
949 $type->setValue($value);
951 if (!in_array($value, array_keys(
$options)) || ($existing_exclusive && $value ==
"dtpl_0")) {
953 $options[$value] = array($this->lng->txt(
'not_available'));
956 if ($existing_exclusive) {
961 $type->setValue(
'dtpl_0');
969 if ($existing_exclusive &&
$id ==
'dtpl_0') {
971 $option->setDisabled(
true);
974 $type->addOption($option);
997 $ilCtrl->redirectByClass(
"ilrepositorygui",
"frameset");
1011 $new_type = $_REQUEST[
"new_type"];
1015 $ilErr->raiseError($this->lng->txt(
"no_create_permission"),
$ilErr->MESSAGE);
1018 $this->lng->loadLanguageModule($new_type);
1019 $this->ctrl->setParameter($this,
"new_type", $new_type);
1022 if (
$form->checkInput()) {
1023 $this->ctrl->setParameter($this,
"new_type",
"");
1028 include_once(
$location .
"/class." . $class_name .
".php");
1029 $newObj =
new $class_name();
1030 $newObj->setType($new_type);
1031 $newObj->setTitle(
$form->getInput(
"title"));
1032 $newObj->setDescription(
$form->getInput(
"desc"));
1040 $newObj->applyDidacticTemplate($dtpl);
1047 $args = func_get_args();
1057 $form->setValuesByPost();
1088 if (!$a_parent_node_id) {
1089 $a_parent_node_id =
$_GET[
"ref_id"];
1093 if ((
int) $_REQUEST[
"crtptrefid"]) {
1094 $a_parent_node_id = (int) $_REQUEST[
"crtptrefid"];
1101 $this->obj_id = $a_obj->
getId();
1102 $this->ref_id = $a_obj->
getRefId();
1105 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1110 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1111 $rbac_log_roles =
$rbacreview->getParentRoleIds($this->ref_id,
false);
1116 if ($_REQUEST[
"crtcb"]) {
1118 $class_name =
"ilObj" .
$objDefinition->getClassName($callback_type) .
"GUI";
1120 include_once(
$location .
"/class." . $class_name .
".php");
1121 if (in_array(strtolower($class_name), array(
"ilobjitemgroupgui"))) {
1122 $callback_obj =
new $class_name((
int) $_REQUEST[
"crtcb"]);
1125 $callback_obj =
new $class_name(null, (
int) $_REQUEST[
"crtcb"],
true,
false);
1127 $callback_obj->afterSaveCallback($a_obj);
1138 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
1139 $this->ctrl->returnToParent($this);
1154 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),
$ilErr->MESSAGE);
1157 $ilTabs->activateTab(
"settings");
1185 $lng->loadLanguageModule($this->object->getType());
1187 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1189 $form->setFormAction($this->ctrl->getFormAction($this,
"update"));
1190 $form->setTitle($this->lng->txt($this->object->getType() .
"_edit"));
1196 $ti->setRequired(
true);
1197 $form->addItem($ti);
1203 $form->addItem($ta);
1207 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
1229 $values[
"title"] = $this->
object->getTitle();
1230 $values[
"desc"] = $this->
object->getLongDescription();
1254 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
1258 if (
$form->checkInput() &&
1260 $this->
object->setTitle(
$form->getInput(
"title"));
1261 $this->
object->setDescription(
$form->getInput(
"desc"));
1263 $this->
object->update();
1270 $ilTabs->activateTab(
"settings");
1271 $form->setValuesByPost();
1300 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1301 $this->ctrl->redirect($this,
"edit");
1312 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1314 $form->setTarget(
"_top");
1315 $form->setFormAction($this->ctrl->getFormAction($this,
"importFile"));
1316 $form->setTitle($this->lng->txt($a_new_type .
"_import"));
1318 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
1319 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"importfile");
1321 $fi->setRequired(
true);
1322 $form->addItem($fi);
1324 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
1325 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
1340 $parent_id =
$_GET[
"ref_id"];
1342 $new_type = $_REQUEST[
"new_type"];
1346 $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
1349 $this->lng->loadLanguageModule($new_type);
1350 $this->ctrl->setParameter($this,
"new_type", $new_type);
1353 if (
$form->checkInput()) {
1357 include_once
'./Services/Export/classes/class.ilImportContainer.php';
1360 include_once(
"./Services/Export/classes/class.ilImport.php");
1361 $imp =
new ilImport((
int) $parent_id);
1365 $new_id = $imp->importObject(
1367 $_FILES[
"importfile"][
"tmp_name"],
1368 $_FILES[
"importfile"][
"name"],
1372 $this->tmp_import_dir = $imp->getTemporaryImportDir();
1373 if (!$a_catch_errors) {
1377 ilUtil::sendFailure($this->lng->txt(
"obj_import_file_error") .
" <br />" . $e->getMessage());
1378 $form->setValuesByPost();
1384 $this->ctrl->setParameter($this,
"new_type",
"");
1407 $form->setValuesByPost();
1418 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
1419 $this->ctrl->returnToParent($this);
1432 if ($this->formaction[$a_cmd] !=
"") {
1433 return $this->formaction[$a_cmd];
1435 return $a_formaction;
1449 $this->formaction[$a_cmd] = $a_formaction;
1461 if ($this->return_location[$a_cmd] !=
"") {
1462 return $this->return_location[$a_cmd];
1478 $this->return_location[$a_cmd] = $a_location;
1490 if ($this->target_frame[$a_cmd] !=
"") {
1491 return $this->target_frame[$a_cmd];
1492 } elseif (!empty($a_target_frame)) {
1493 return "target=\"" . $a_target_frame .
"\"";
1508 $this->target_frame[$a_cmd] =
"target=\"" . $a_target_frame .
"\"";
1516 if ($visible &&
$a_type ==
'crs') {
1518 if ($crs_id =
$tree->checkForParentType($a_ref_id,
'crs')) {
1523 if (!$tmp_obj->isActivated()) {
1546 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
1550 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1553 $this->object->getType(),
1554 $this->
object->getRefId(),
1555 $this->
object->getId(),
1560 include_once(
"./Services/Repository/classes/class.ilAdminSubItemsTableGUI.php");
1561 if (!$this->call_by_reference) {
1562 $this->ctrl->setParameter($this,
"obj_id", $this->obj_id);
1571 $tpl->setContent($itab->getHTML());
1585 if (
$_GET[
"item_ref_id"] !=
"") {
1589 if (is_array(
$_POST[
"id"])) {
1598 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
1600 if (!$ru->showDeleteConfirmation(
$_POST[
"id"], $a_error)) {
1601 $ilCtrl->returnToParent($this);
1612 if ($this->sub_objects ==
"") {
1620 if (count(
$d) > 0) {
1624 if ($row[
"max"] > 0) {
1626 for (
$i = 0;
$i < count($this->
data[
"ctrl"]);
$i++) {
1627 if ($this->
data[
"ctrl"][
$i][
"type"] == $row[
"name"]) {
1633 if ($row[
"max"] ==
"" || $count < $row[
"max"]) {
1634 $subobj[] = $row[
"name"];
1639 if (is_array($subobj)) {
1643 $this->tpl->setCurrentBlock(
"add_object");
1644 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1645 $this->tpl->setVariable(
"BTN_NAME",
"create");
1646 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
1647 $this->tpl->parseCurrentBlock();
1662 die(
"ilObjectGUI::getTemplateFile() is deprecated.");
1682 $ilToolbar->addButton($a_text, $this->ctrl->getLinkTarget($this, $a_cmd), $a_target);
1694 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1707 case "clipboardObject":
1708 $offset =
$_GET[
"offset"];
1709 $order =
$_GET[
"sort_by"];
1710 $direction =
$_GET[
"sort_order"];
1711 $tbl->disable(
"footer");
1715 $offset =
$_GET[
"offset"];
1716 $order =
$_GET[
"sort_by"];
1717 $direction =
$_GET[
"sort_order"];
1721 $tbl->setOrderColumn($order);
1722 $tbl->setOrderDirection($direction);
1723 $tbl->setOffset($offset);
1725 $tbl->setFooter(
"tblfooter", $this->lng->txt(
"previous"), $this->lng->txt(
"next"));
1726 $tbl->setData($result_set);
1741 $class_name = $this->objDefinition->getClassName($obj_type);
1742 $class = strtolower(
"ilObj" . $class_name .
"GUI");
1743 $this->ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_ref_id);
1744 $this->ctrl->redirectByClass(array(
"ilrepositorygui", $class), $a_cmd);
1759 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
1762 $cp->setTarget(
$_GET[
'ref_id']);
1763 if ($a_tpl_varname) {
1764 $cp->showSourceSearch($a_tpl_varname);
1766 return $cp->showSourceSearch(null);
1778 include_once(
'./Services/Link/classes/class.ilLink.php');
1779 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
1784 $new_type = $_REQUEST[
'new_type'];
1786 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1788 if (!(
int) $_REQUEST[
'clone_source']) {
1793 if (!$this->
checkPermissionBool(
"write",
"", $new_type, (
int) $_REQUEST[
'clone_source'])) {
1794 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1800 $wizard_options->saveOwner(
$ilUser->getId());
1801 $wizard_options->saveRoot((
int) $_REQUEST[
'clone_source']);
1804 foreach (
$options as $source_id => $option) {
1805 $wizard_options->addEntry($source_id, $option);
1807 $wizard_options->read();
1810 $new_obj = $orig->cloneObject((
int)
$_GET[
'ref_id'], $copy_id);
1813 $wizard_options->deleteAll();
1815 ilUtil::sendSuccess($this->lng->txt(
"object_duplicated"),
true);
1827 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1832 if (
$ilCtrl->getNextClass() !=
"ilcolumngui") {
1834 return $this->getContent();
1843 $this->
html =
$ilCtrl->forwardCommand($column_gui);
1849 $this->
html =
$ilCtrl->forwardCommand($column_gui);
1853 return $this->getContent();
1871 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1880 if (
$ilCtrl->getNextClass() ==
"ilcolumngui" &&
1918 if (!is_int(strpos(
$_SERVER[
"PHP_SELF"],
"goto.php"))) {
1920 if ($a_perm ==
"create") {
1922 $a_ref_id =
$_GET[
"ref_id"];
1927 if (!is_object($this->
object)) {
1931 $a_ref_id = $this->
object->getRefId();
1933 $type = $this->
object->getType();
1938 include_once
"Services/Object/exceptions/class.ilObjectException.php";
1948 die(
"Permission Denied.");
1966 if ($a_perm ==
"create") {
1968 $a_ref_id =
$_GET[
"ref_id"];
1970 return $ilAccess->checkAccess($a_perm .
"_" .
$a_type, $a_cmd, $a_ref_id);
1973 if (!is_object($this->
object)) {
1977 $a_ref_id = $this->
object->getRefId();
1979 return $ilAccess->checkAccess($a_perm, $a_cmd, $a_ref_id);
1993 $ilAccess = $DIC->access();
1995 $lng = $DIC->language();
1997 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
1998 $_GET[
"cmd"] =
"frameset";
1999 $_GET[
"target"] =
"";
2000 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
2001 $_GET[
"baseClass"] =
"ilRepositoryGUI";
2002 include(
"ilias.php");
2006 if ($a_raise_error) {
2021 $ilAccess = $DIC->access();
2024 $_GET[
"cmd"] = $a_cmd;
2025 $_GET[
"target"] =
"";
2026 $_GET[
"ref_id"] = $a_ref_id;
2027 $_GET[
"baseClass"] =
"ilRepositoryGUI";
2028 include(
"ilias.php");
2037 include_once(
"./Services/FileUpload/classes/class.ilFileUploadGUI.php");
2040 $this->tpl->enableDragDropFileUpload($this->ref_id);
2051 method_exists($a_new_obj,
"setRating")) {
2052 $a_new_obj->setRating(
true);
2061 protected function showCustomIconsEditing($a_input_colspan = 1,
ilPropertyFormGUI $a_form = null, $a_as_section =
true)
2063 if ($this->
settings->get(
"custom_icons")) {
2067 $customIconFactory = $DIC[
'object.customicons.factory'];
2069 $customIcon = $customIconFactory->getByObjId($this->object->getId(), $this->
object->getType());
2071 if ($a_as_section) {
2073 $title->setTitle($this->lng->txt(
"icon_settings"));
2077 $a_form->addItem(
$title);
2079 $caption = $this->lng->txt(
"cont_custom_icon");
2082 $icon->setSuffixes($customIcon->getSupportedFileExtensions());
2083 $icon->setUseCache(
false);
2084 if ($customIcon->exists()) {
2085 $icon->setImage($customIcon->getFullPath());
2087 $icon->setImage(
'');
2089 if ($a_as_section) {
2090 $a_form->addItem($icon);
2092 $title->addSubItem($icon);
2107 $ctrl->redirectToURL($link);
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 _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.
This class represents an option in a radio group.
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.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
static commentsActivated($a_rep_obj_id, $a_obj_id, $a_obj_type, $a_news_id=0)
Are comments activated for object?
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 ...
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.
if(!array_key_exists('StateId', $_REQUEST)) $id
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)
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(isset($_POST['submit'])) $form
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.
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 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
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 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)
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.
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.
redirectAfterCreation()
Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html.
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
getObjectService()
Get object service.
update()
update object in db
afterUpdate()
Post (successful) object update hook.
static redirect($a_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.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
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.