25 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
32 $lng->loadLanguageModule(
"cntr");
33 $lng->loadLanguageModule(
"obj");
51 $this->ctrl->returnToParent($this);
76 $ilHelp->setScreenIdComponent(
"root");
78 $this->ctrl->setParameter($this,
"ref_id", $this->ref_id);
80 if (
$rbacsystem->checkAccess(
'read', $this->ref_id)) {
81 $this->tabs_gui->addTab(
84 $this->ctrl->getLinkTarget($this,
"")
88 if (
$rbacsystem->checkAccess(
'write', $this->ref_id)) {
89 $force_active = (
$_GET[
"cmd"] ==
"edit")
92 $this->tabs_gui->addTarget(
94 $this->ctrl->getLinkTarget($this,
"edit"),
110 $next_class = $this->ctrl->getNextClass($this);
111 $cmd = $this->ctrl->getCmd();
114 switch ($next_class) {
116 $ru = new \ilRepUtilGUI($this);
117 $this->ctrl->setReturn($this,
'trash');
118 $this->ctrl->forwardCommand($ru);
122 case 'ilcontainerlinklistgui':
123 include_once(
"Services/Container/classes/class.ilContainerLinkListGUI.php");
125 $ret = &$this->ctrl->forwardCommand($link_list_gui);
129 case "ilcontainerpagegui":
133 $this->tpl->setContent(
$ret);
137 case 'ilpermissiongui':
139 $this->tabs_gui->activateTab(
'perm_settings');
141 $ret = $this->ctrl->forwardCommand($perm_gui);
147 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
148 $this->tpl->setVariable(
149 "LOCATION_CONTENT_STYLESHEET",
155 case 'ilobjectcopygui':
157 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
159 $cp->setType(
'root');
160 $this->ctrl->forwardCommand($cp);
163 case "ilobjstylesheetgui":
167 case "ilcommonactiondispatchergui":
168 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
170 $this->ctrl->forwardCommand($gui);
173 case 'ilobjecttranslationgui':
178 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
180 $this->ctrl->forwardCommand($transgui);
184 if ($cmd ==
"infoScreen") {
190 $this->ctrl->redirectToURL(
"login.php?client_id=" . CLIENT_ID .
"&cmd=force_login");
194 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
195 $this->tpl->setVariable(
196 "LOCATION_CONTENT_STYLESHEET",
219 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
220 ilObjectListGUI::prepareJSLinks(
222 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
223 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false)
226 $ilTabs->activateTab(
"view_content");
227 $ret = parent::renderObject();
240 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
241 parent::viewObject();
258 parent::setTitleAndDescription();
259 $this->tpl->setDescription(
"");
261 if ($this->object->getTitle() ==
"ILIAS") {
262 $this->tpl->setTitle(
$lng->txt(
"repository"));
264 if ($this->object->getDescription() !=
"") {
265 $this->tpl->setDescription($this->object->getDescription());
273 $this->tabs_gui->addSubTab(
275 $this->lng->txt(
"settings"),
276 $this->ctrl->getLinkTarget($this,
"edit")
283 $this->tabs_gui->addSubTab(
285 $this->lng->txt(
"obj_multilinguality"),
286 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"")
290 $this->tabs_gui->activateTab(
"settings");
291 $this->tabs_gui->activateSubTab($active_tab);
299 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
301 $form->setFormAction($this->ctrl->getFormAction($this));
302 $form->setTitle($this->lng->txt(
"repository"));
306 $pres->setTitle($this->lng->txt(
'obj_presentation'));
307 $form->addItem($pres);
317 ilcontainer::SORT_MANUAL
322 $this->showCustomIconsEditing(1, $form,
false);
324 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTitleIconVisibility();
331 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
332 $form->addCommandButton(
"addTranslation", $this->lng->txt(
"add_translation"));
354 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
357 if ($form->checkInput()) {
366 $customIconFactory =
$DIC[
'object.customicons.factory'];
367 $customIcon = $customIconFactory->getByObjId($this->object->getId(), $this->object->getType());
370 $fileData = (array) $form->getInput(
'cont_icon');
371 $item = $form->getItemByPostVar(
'cont_icon');
373 if ($item->getDeletionFlag()) {
374 $customIcon->remove();
377 if ($fileData[
'tmp_name']) {
378 $customIcon->saveFromHttpRequest();
384 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveTitleIconVisibility();
393 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
398 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
399 $this->ctrl->redirect($this,
"edit");
404 $form->setValuesByPost();
405 $this->tpl->setContent($form->getHTML());
417 $this->ctrl->redirectByClass(
"ilobjecttranslationgui",
"");
419 $this->lng->loadLanguageModule($this->object->getType());
422 include_once(
"./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
429 if ($a_get_post_values) {
431 foreach (
$_POST[
"title"] as $k => $v) {
432 $vals[] = array(
"title" => $v,
433 "desc" =>
$_POST[
"desc"][$k],
434 "lang" =>
$_POST[
"lang"][$k],
435 "default" => (
$_POST[
"default"] == $k));
437 $table->setData($vals);
439 $data = $this->
object->getTranslations();
440 foreach (
$data[
"Fobject"] as $k => $v) {
441 $data[
"Fobject"][$k][
"default"] = ($k ==
$data[
"default_language"]);
443 $table->setData(
$data[
"Fobject"]);
445 $tpl->setContent($table->getHTML());
454 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->ilias->error_obj->MESSAGE);
458 if (!isset(
$_POST[
"default"]) && count(
$_POST[
"lang"]) > 0) {
464 if (array_key_exists(
"",
$_POST[
"lang"])) {
470 if (count(array_unique(
$_POST[
"lang"])) < count(
$_POST[
"lang"])) {
476 $this->
object->removeTranslations();
478 if (
sizeof(
$_POST[
"title"])) {
479 foreach (
$_POST[
"title"] as $k => $v) {
481 $is_default = (
$_POST[
"default"] == $k);
485 $this->
object->update();
488 $this->
object->addTranslation(
497 $this->
object->setTitle(
"ILIAS");
498 $this->
object->setDescription(
"");
499 $this->
object->update();
502 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
503 $this->ctrl->redirect($this,
"editTranslations");
511 if (
sizeof(
$_POST[
"title"])) {
512 $k = max(array_keys(
$_POST[
"title"])) + 1;
526 foreach (
$_POST[
"title"] as $k => $v) {
527 if (
$_POST[
"check"][$k]) {
528 unset(
$_POST[
"title"][$k]);
529 unset(
$_POST[
"desc"][$k]);
530 unset(
$_POST[
"lang"][$k]);
531 if (
$_POST[
"default"] == $k) {
537 if ($del_default &&
sizeof(
$_POST[
"title"])) {
538 $_POST[
"default"] = array_shift(array_keys(
$_POST[
"title"]));
546 public static function _goto($a_target)
An exception for terminatinating execution or to throw for unit testing.
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
& forwardToPageObject()
forward command to page object
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
prepareOutput($a_show_subobjects=true)
prepare output
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
forwardToStyleSheet()
Forward to style object.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
Class ilContainerLinkListGUI.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
static _importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)
Class ilObjRootFolderGUI.
importCategoriesFormObject()
import categories form
importCategoriesWithRolObject()
import categories
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
saveTranslationsObject()
Save title and translations.
static _goto($a_target)
goto target group
getTabs()
common tabs for all container objects (should be called at the end of child getTabs() method
getEditFormValues()
Get values for edit form.
initEditForm()
Init object edit form.
executeCommand()
execute command note: this method is overwritten in all container objects
viewObject()
View root folder.
importCancelledObject()
import cancelled
deleteTranslationsObject()
Remove translation.
setTitleAndDescription()
called by prepare output
setEditTabs($active_tab="settings_misc")
addTranslationObject()
Add a translation.
importCategoriesObject()
import categories
renderObject()
Render root folder.
editTranslationsObject($a_get_post_values=false)
Edit title and translations.
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
GUI class for the workflow of copying objects.
Base exception class for object service.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
getObjectService()
Get object service.
updateObject()
updates object entry in object_data
GUI class for object translation handling.
TableGUI class for title/description translations.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)