143 public function __construct($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
true)
147 $this->locator = $DIC[
"ilLocator"];
148 $this->
user = $DIC->user();
149 $this->access = $DIC->access();
151 $this->rbacreview = $DIC->rbac()->review();
152 $this->toolbar = $DIC->toolbar();
153 $this->rbacsystem = $DIC->rbac()->system();
154 $this->object_service = $DIC->object();
157 $tree = $DIC->repositoryTree();
160 $lng = $DIC->language();
161 $ilTabs = $DIC->tabs();
165 $this->
ilias = $DIC[
"ilias"];
170 $this->tabs_gui = $ilTabs;
184 $params = array(
"ref_id");
186 if (!$a_call_by_reference) {
187 $params = array(
"ref_id",
"obj_id");
190 $this->ctrl->saveParameter($this, $params);
194 $this->formaction = array();
195 $this->return_location = array();
196 $this->target_frame = array();
198 $this->sub_objects =
"";
200 $this->data = $a_data;
202 $this->call_by_reference = $a_call_by_reference;
203 $this->prepare_output = $a_prepare_output;
204 $this->creation_mode =
false;
206 $this->ref_id = ($this->call_by_reference) ? $this->
id :
$_GET[
"ref_id"];
207 $this->obj_id = ($this->call_by_reference) ?
$_GET[
"obj_id"] : $this->
id;
209 if ($this->
id != 0) {
217 if (is_object($this->
object)) {
218 if ($this->call_by_reference && $this->ref_id ==
$_GET[
"ref_id"]) {
219 $this->ctrl->setContext(
220 $this->object->getId(),
221 $this->
object->getType()
227 if ($a_prepare_output) {
247 $next_class = $this->ctrl->getNextClass($this);
248 $cmd = $this->ctrl->getCmd();
250 switch ($next_class) {
271 return $this->call_by_reference;
282 $this->creation_mode = $a_mode;
290 return $this->creation_mode;
297 if ($this->
id != 0) {
298 if ($this->call_by_reference) {
315 $this->tpl->loadStandardTemplate();
317 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
342 if ($this->call_by_reference) {
345 $class_name = $this->objDefinition->getClassName($obj_type);
346 $class = strtolower(
"ilObj" . $class_name .
"GUI");
347 $class_path = $this->ctrl->lookupClassPath($class);
348 include_once($class_path);
349 $class_name = $this->ctrl->getClassForClasspath($class_path);
351 $this->parent_gui_obj =
new $class_name(
"",
$_GET[
"ref_id"],
true,
false);
353 $this->parent_gui_obj->setCreationMode(
true);
354 $this->parent_gui_obj->setTitleAndDescription();
365 require_once
'./Services/FileUpload/classes/class.ilFileUploadUtil.php';
379 if (!is_object($this->
object)) {
380 if ((
int) $_REQUEST[
"crtptrefid"] > 0) {
383 $this->tpl->setTitleIcon(ilObject::_getIcon($cr_obj_id));
387 $this->tpl->setTitle($this->object->getPresentationTitle());
388 $this->tpl->setDescription($this->object->getLongDescription());
390 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
392 $this->tpl->setTitleIcon(ilObject::_getIcon(
"",
"big", $this->object->getType()));
394 $this->tpl->setTitleIcon(
395 ilObject::_getIcon(
"",
"big", $this->object->getType()),
396 $this->lng->txt(
"obj_" . $this->object->getType())
400 include_once
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
402 $lgui->initItem($this->object->getRefId(), $this->
object->getId(), $this->
object->getType());
403 $this->tpl->setAlertProperties($lgui->getAlertProperties());
417 if (!$this->creation_mode && $this->
object) {
418 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
422 $this->object->getType(),
424 $this->
object->getId()
429 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
430 ilObjectListGUI::prepareJSLinks(
431 $this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
432 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
433 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false)
436 $lg = $dispatcher->initHeaderAction();
438 if (is_object($lg)) {
441 $lg->setContainerObject($this);
445 $lg->enableMultiDownload(
true);
449 include_once
"Services/Notes/classes/class.ilNote.php";
450 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
451 $ilAccess->checkAccess(
"edit_permissions",
"", $this->ref_id) ||
453 $lg->enableComments(
true);
456 $lg->enableNotes(
true);
457 $lg->enableTags(
true);
475 if (is_object($a_list_gui)) {
476 $this->tpl->setHeaderActionMenu($a_list_gui->getHeaderAction());
496 echo $lg->getHeaderAction();
499 echo
$tpl->getOnLoadCodeForAsynch();
532 $this->tabs_gui->addTarget(
534 $this->ctrl->getLinkTarget($this,
"view"),
541 $this->tabs_gui->addTarget(
543 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
565 if (is_array($a_actions)) {
582 if (is_array($a_sub_objects)) {
583 foreach ($a_sub_objects as
$name => $options) {
584 $this->sub_objects[
$name] = array(
"name" =>
$name,
"max" => $options[
"max"]);
587 $this->sub_objects =
"";
604 if ($this->omit_locator) {
609 if ($this->call_by_reference) {
615 : $this->object->getRefId();
616 $ilLocator->addRepositoryItems(
$ref_id);
619 if (!$this->creation_mode) {
636 $this->omit_locator = $a_omit;
649 if (
$_GET[
"admin_mode"] ==
"settings") {
650 $this->ctrl->setParameterByClass(
651 "ilobjsystemfoldergui",
656 $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 $this->object->getTitle(),
662 $this->ctrl->getLinkTarget($this,
"view")
666 $this->ctrl->setParameterByClass(
667 "iladministrationgui",
671 $this->ctrl->setParameterByClass(
672 "iladministrationgui",
679 $this->ctrl->clearParametersByClass(
"iladministrationgui");
680 $ilLocator->addAdministrationItems();
690 if (isset(
$_POST[
"mref_id"])) {
694 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
698 $this->ctrl->returnToParent($this);
709 $this->ctrl->returnToParent($this);
721 $this->ctrl->returnToParent($this);
734 $new_type = $_REQUEST[
"new_type"];
738 $this->ctrl->saveParameter($this,
"crtptrefid");
740 $this->ctrl->saveParameter($this,
"crtcb");
743 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
745 $this->lng->loadLanguageModule($new_type);
746 $this->ctrl->setParameter($this,
"new_type", $new_type);
751 if (
$_GET[
"cpfl"] && isset($forms[self::CFORM_CLONE])) {
752 $forms = array(self::CFORM_CLONE => $forms[self::CFORM_CLONE]);
787 foreach ($a_forms as $id => $form) {
789 unset($a_forms[$id]);
794 if (
sizeof($a_forms) == 1) {
795 $form_type = key($a_forms);
796 $a_forms = array_shift($a_forms);
799 if (method_exists($this,
"getCreationFormTitle")) {
800 $form_title = $this->getCreationFormTitle($form_type);
801 if ($form_title !=
"") {
802 $a_forms->setTitle($form_title);
805 return $a_forms->getHTML();
807 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
812 foreach ($a_forms as $form_type => $cf) {
813 $htpl =
new ilTemplate(
"tpl.creation_acc_head.html",
true,
true,
"Services/Object");
817 if (method_exists($this,
"getCreationFormTitle")) {
818 $form_title = $this->getCreationFormTitle($form_type);
821 $form_title = $cf->getTitle();
825 $htpl->setVariable(
"TITLE", $this->lng->txt(
"option") .
" " . $cnt .
": " .
828 $cf->setTitleIcon(null);
829 $cf->setTableWidth(
"100%");
831 $acc->addItem($htpl->get(), $cf->getHTML());
836 return "<div class='ilCreationFormSection'>" . $acc->getHTML() .
"</div>";
848 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
850 $form->setTarget(
"_top");
851 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
852 $form->setTitle($this->lng->txt($a_new_type .
"_new"));
858 $ti->setRequired(
true);
869 $form->addCommandButton(
"save", $this->lng->txt($a_new_type .
"_add"));
870 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
884 $lng->loadLanguageModule(
'didactic');
885 $existing_exclusive =
false;
887 $options[
'dtpl_0'] = array($this->lng->txt(
'didactic_default_type'),
889 $this->lng->txt(
'didactic_default_type_info'),
890 $this->lng->txt(
'objs_' . $this->type)
893 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
896 foreach ($templates as $template) {
897 if ($template->isEffective(
$_GET[
"ref_id"])) {
898 $options[
"dtpl_" . $template->getId()] = array(
899 $template->getPresentationTitle(),
900 $template->getPresentationDescription()
903 if ($template->isExclusive()) {
904 $existing_exclusive =
true;
912 if (
sizeof($options) > 1) {
914 $this->lng->txt(
'type'),
919 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
922 $type->setValue($value);
924 if (!in_array($value, array_keys($options)) || ($existing_exclusive && $value ==
"dtpl_0")) {
926 $options[$value] = array($this->lng->txt(
'not_available'));
929 if ($existing_exclusive) {
931 $keys = array_keys($options);
934 $type->setValue(
'dtpl_0');
939 foreach ($options as $id =>
$data) {
942 if ($existing_exclusive && $id ==
'dtpl_0') {
944 $option->setDisabled(
true);
947 $type->addOption($option);
970 $ilCtrl->redirectByClass(
"ilrepositorygui",
"frameset");
984 $new_type = $_REQUEST[
"new_type"];
988 $ilErr->raiseError($this->lng->txt(
"no_create_permission"),
$ilErr->MESSAGE);
991 $this->lng->loadLanguageModule($new_type);
992 $this->ctrl->setParameter($this,
"new_type", $new_type);
995 if ($form->checkInput()) {
996 $this->ctrl->setParameter($this,
"new_type",
"");
1001 include_once(
$location .
"/class." . $class_name .
".php");
1002 $newObj =
new $class_name();
1003 $newObj->setType($new_type);
1004 $newObj->setTitle($form->getInput(
"title"));
1005 $newObj->setDescription($form->getInput(
"desc"));
1013 $newObj->applyDidacticTemplate($dtpl);
1020 $args = func_get_args();
1030 $form->setValuesByPost();
1031 $tpl->setContent($form->getHtml());
1061 if (!$a_parent_node_id) {
1062 $a_parent_node_id =
$_GET[
"ref_id"];
1066 if ((
int) $_REQUEST[
"crtptrefid"]) {
1067 $a_parent_node_id = (int) $_REQUEST[
"crtptrefid"];
1074 $this->obj_id = $a_obj->
getId();
1075 $this->ref_id = $a_obj->
getRefId();
1078 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1083 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1084 $rbac_log_roles =
$rbacreview->getParentRoleIds($this->ref_id,
false);
1089 if ($_REQUEST[
"crtcb"]) {
1091 $class_name =
"ilObj" .
$objDefinition->getClassName($callback_type) .
"GUI";
1093 include_once(
$location .
"/class." . $class_name .
".php");
1094 if (in_array(strtolower($class_name), array(
"ilobjitemgroupgui"))) {
1095 $callback_obj =
new $class_name((
int) $_REQUEST[
"crtcb"]);
1098 $callback_obj =
new $class_name(null, (
int) $_REQUEST[
"crtcb"],
true,
false);
1100 $callback_obj->afterSaveCallback($a_obj);
1111 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
1112 $this->ctrl->returnToParent($this);
1127 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),
$ilErr->MESSAGE);
1130 $ilTabs->activateTab(
"settings");
1135 $form->setValuesByArray($values);
1140 $tpl->setContent($form->getHTML());
1158 $lng->loadLanguageModule($this->object->getType());
1160 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1162 $form->setFormAction($this->ctrl->getFormAction($this,
"update"));
1163 $form->setTitle($this->lng->txt($this->object->getType() .
"_edit"));
1169 $ti->setRequired(
true);
1170 $form->addItem($ti);
1176 $form->addItem($ta);
1180 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
1202 $values[
"title"] = $this->
object->getTitle();
1203 $values[
"desc"] = $this->
object->getLongDescription();
1227 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
1231 if ($form->checkInput() &&
1233 $this->
object->setTitle($form->getInput(
"title"));
1234 $this->
object->setDescription($form->getInput(
"desc"));
1236 $this->
object->update();
1243 $ilTabs->activateTab(
"settings");
1244 $form->setValuesByPost();
1245 $tpl->setContent($form->getHtml());
1273 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1274 $this->ctrl->redirect($this,
"edit");
1285 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1287 $form->setTarget(
"_top");
1288 $form->setFormAction($this->ctrl->getFormAction($this,
"importFile"));
1289 $form->setTitle($this->lng->txt($a_new_type .
"_import"));
1291 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
1292 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"importfile");
1294 $fi->setRequired(
true);
1295 $form->addItem($fi);
1297 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
1298 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
1313 $parent_id =
$_GET[
"ref_id"];
1315 $new_type = $_REQUEST[
"new_type"];
1319 $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
1322 $this->lng->loadLanguageModule($new_type);
1323 $this->ctrl->setParameter($this,
"new_type", $new_type);
1326 if ($form->checkInput()) {
1330 include_once
'./Services/Export/classes/class.ilImportContainer.php';
1333 include_once(
"./Services/Export/classes/class.ilImport.php");
1334 $imp =
new ilImport((
int) $parent_id);
1338 $new_id = $imp->importObject(
1340 $_FILES[
"importfile"][
"tmp_name"],
1341 $_FILES[
"importfile"][
"name"],
1345 $this->tmp_import_dir = $imp->getTemporaryImportDir();
1346 if (!$a_catch_errors) {
1350 ilUtil::sendFailure($this->lng->txt(
"obj_import_file_error") .
" <br />" . $e->getMessage());
1351 $form->setValuesByPost();
1352 $tpl->setContent($form->getHtml());
1357 $this->ctrl->setParameter($this,
"new_type",
"");
1380 $form->setValuesByPost();
1381 $tpl->setContent($form->getHtml());
1391 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
1392 $this->ctrl->returnToParent($this);
1405 if ($this->formaction[$a_cmd] !=
"") {
1406 return $this->formaction[$a_cmd];
1408 return $a_formaction;
1422 $this->formaction[$a_cmd] = $a_formaction;
1434 if ($this->return_location[$a_cmd] !=
"") {
1435 return $this->return_location[$a_cmd];
1451 $this->return_location[$a_cmd] = $a_location;
1463 if ($this->target_frame[$a_cmd] !=
"") {
1464 return $this->target_frame[$a_cmd];
1465 } elseif (!empty($a_target_frame)) {
1466 return "target=\"" . $a_target_frame .
"\"";
1481 $this->target_frame[$a_cmd] =
"target=\"" . $a_target_frame .
"\"";
1489 if ($visible &&
$a_type ==
'crs') {
1491 if ($crs_id =
$tree->checkForParentType($a_ref_id,
'crs')) {
1496 if (!$tmp_obj->isActivated()) {
1516 $tpl = $DIC->ui()->mainTemplate();
1517 $user = $DIC->user();
1521 $this->tabs_gui->activateTab(
'view');
1524 $this->object->getType(),
1525 $this->
object->getRefId(),
1526 $this->
object->getId(),
1531 $this->ctrl->setParameter($this,
'obj_id', $this->obj_id);
1540 $tpl->setContent($itab->getHTML());
1554 if (
$_GET[
"item_ref_id"] !=
"") {
1558 if (is_array(
$_POST[
"id"])) {
1559 foreach (
$_POST[
"id"] as $idx => $id) {
1560 $_POST[
"id"][$idx] = (int) $id;
1567 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
1569 if (!$ru->showDeleteConfirmation(
$_POST[
"id"], $a_error)) {
1570 $ilCtrl->returnToParent($this);
1581 if ($this->sub_objects ==
"") {
1589 if (count(
$d) > 0) {
1590 foreach (
$d as $row) {
1593 if ($row[
"max"] > 0) {
1595 for (
$i = 0;
$i < count($this->data[
"ctrl"]);
$i++) {
1596 if ($this->data[
"ctrl"][
$i][
"type"] == $row[
"name"]) {
1602 if ($row[
"max"] ==
"" || $count < $row[
"max"]) {
1603 $subobj[] = $row[
"name"];
1608 if (is_array($subobj)) {
1612 $this->tpl->setCurrentBlock(
"add_object");
1613 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1614 $this->tpl->setVariable(
"BTN_NAME",
"create");
1615 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
1616 $this->tpl->parseCurrentBlock();
1631 die(
"ilObjectGUI::getTemplateFile() is deprecated.");
1651 $ilToolbar->addButton($a_text, $this->ctrl->getLinkTarget($this, $a_cmd), $a_target);
1663 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1676 case "clipboardObject":
1677 $offset =
$_GET[
"offset"];
1678 $order =
$_GET[
"sort_by"];
1679 $direction =
$_GET[
"sort_order"];
1680 $tbl->disable(
"footer");
1684 $offset =
$_GET[
"offset"];
1685 $order =
$_GET[
"sort_by"];
1686 $direction =
$_GET[
"sort_order"];
1690 $tbl->setOrderColumn($order);
1691 $tbl->setOrderDirection($direction);
1692 $tbl->setOffset($offset);
1693 $tbl->setLimit(
$_GET[
"limit"]);
1694 $tbl->setFooter(
"tblfooter", $this->lng->txt(
"previous"), $this->lng->txt(
"next"));
1695 $tbl->setData($result_set);
1710 $class_name = $this->objDefinition->getClassName($obj_type);
1711 $class = strtolower(
"ilObj" . $class_name .
"GUI");
1712 $this->ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $a_ref_id);
1713 $this->ctrl->redirectByClass(array(
"ilrepositorygui", $class), $a_cmd);
1728 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
1731 $cp->setTarget(
$_GET[
'ref_id']);
1732 if ($a_tpl_varname) {
1733 $cp->showSourceSearch($a_tpl_varname);
1735 return $cp->showSourceSearch(null);
1747 include_once(
'./Services/Link/classes/class.ilLink.php');
1748 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
1753 $new_type = $_REQUEST[
'new_type'];
1755 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1757 if (!(
int) $_REQUEST[
'clone_source']) {
1762 if (!$this->
checkPermissionBool(
"write",
"", $new_type, (
int) $_REQUEST[
'clone_source'])) {
1763 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1769 $wizard_options->saveOwner(
$ilUser->getId());
1770 $wizard_options->saveRoot((
int) $_REQUEST[
'clone_source']);
1772 $options =
$_POST[
'cp_options'] ?
$_POST[
'cp_options'] : array();
1773 foreach ($options as $source_id => $option) {
1774 $wizard_options->addEntry($source_id, $option);
1776 $wizard_options->read();
1779 $new_obj = $orig->cloneObject((
int)
$_GET[
'ref_id'], $copy_id);
1782 $wizard_options->deleteAll();
1784 ilUtil::sendSuccess($this->lng->txt(
"object_duplicated"),
true);
1796 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1801 if (
$ilCtrl->getNextClass() !=
"ilcolumngui") {
1803 return $this->getContent();
1812 $this->html =
$ilCtrl->forwardCommand($column_gui);
1818 $this->html =
$ilCtrl->forwardCommand($column_gui);
1822 return $this->getContent();
1840 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1849 if (
$ilCtrl->getNextClass() ==
"ilcolumngui" &&
1852 $html =
$ilCtrl->forwardCommand($column_gui);
1855 $html =
$ilCtrl->getHTML($column_gui);
1887 if (!is_int(strpos(
$_SERVER[
"PHP_SELF"],
"goto.php"))) {
1889 if ($a_perm ==
"create") {
1891 $a_ref_id =
$_GET[
"ref_id"];
1896 if (!is_object($this->
object)) {
1900 $a_ref_id = $this->
object->getRefId();
1902 $type = $this->
object->getType();
1907 include_once
"Services/Object/exceptions/class.ilObjectException.php";
1917 die(
"Permission Denied.");
1935 if ($a_perm ==
"create") {
1937 $a_ref_id =
$_GET[
"ref_id"];
1939 return $ilAccess->checkAccess($a_perm .
"_" .
$a_type, $a_cmd, $a_ref_id);
1942 if (!is_object($this->
object)) {
1946 $a_ref_id = $this->
object->getRefId();
1948 return $ilAccess->checkAccess($a_perm, $a_cmd, $a_ref_id);
1962 $ilAccess = $DIC->access();
1964 $lng = $DIC->language();
1966 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
1967 $_GET[
"cmd"] =
"frameset";
1968 $_GET[
"target"] =
"";
1969 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1970 $_GET[
"baseClass"] =
"ilRepositoryGUI";
1971 include(
"ilias.php");
1975 if ($a_raise_error) {
1990 $ilAccess = $DIC->access();
1993 $_GET[
"cmd"] = $a_cmd;
1994 $_GET[
"target"] =
"";
1995 $_GET[
"ref_id"] = $a_ref_id;
1996 $_GET[
"baseClass"] =
"ilRepositoryGUI";
1997 include(
"ilias.php");
2006 include_once(
"./Services/FileUpload/classes/class.ilFileUploadGUI.php");
2009 $this->tpl->enableDragDropFileUpload($this->ref_id);
2020 method_exists($a_new_obj,
"setRating")) {
2021 $a_new_obj->setRating(
true);
2030 protected function showCustomIconsEditing($a_input_colspan = 1,
ilPropertyFormGUI $a_form = null, $a_as_section =
true)
2032 if ($this->
settings->get(
"custom_icons")) {
2036 $customIconFactory = $DIC[
'object.customicons.factory'];
2038 $customIcon = $customIconFactory->getByObjId($this->object->getId(), $this->
object->getType());
2040 if ($a_as_section) {
2042 $title->setTitle($this->lng->txt(
"icon_settings"));
2046 $a_form->addItem($title);
2048 $caption = $this->lng->txt(
"cont_custom_icon");
2051 $icon->setSuffixes($customIcon->getSupportedFileExtensions());
2052 $icon->setUseCache(
false);
2053 if ($customIcon->exists()) {
2054 $icon->setImage($customIcon->getFullPath());
2056 $icon->setImage(
'');
2058 if ($a_as_section) {
2059 $a_form->addItem($icon);
2061 $title->addSubItem($icon);
2076 $ctrl->redirectToURL($link);
2087 $this->favourites->add(
$user->getId(), (int)
$_GET[
"item_ref_id"]);
2088 $lng->loadLanguageModule(
"rep");
2089 ilUtil::sendSuccess(
$lng->txt(
"rep_added_to_favourites"),
true);
2101 $lng->loadLanguageModule(
"rep");
2102 $this->favourites->remove(
$user->getId(), (int)
$_GET[
"item_ref_id"]);
2103 ilUtil::sendSuccess(
$lng->txt(
"rep_removed_from_favourites"),
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 _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.
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.
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()
viewObject container presentation for "administration -> repository, trash, permissions" ...
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...
Manages favourites, currently the interface for other components, needs discussion.
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.
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.
omitLocator($a_omit=true)
getTemplateFile($a_cmd, $a_type="")
get a template blockfile format: tpl.
Repository GUI Utilities.
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)
__construct(Container $dic, ilPlugin $plugin)
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.