19 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
20 require_once
"./Modules/Category/classes/class.ilObjCategoryGUI.php";
28 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
33 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
35 $lng->loadLanguageModule(
"cntr");
36 $lng->loadLanguageModule(
"obj");
54 $this->ctrl->returnToParent($this);
79 $ilHelp->setScreenIdComponent(
"root");
81 $this->ctrl->setParameter($this,
"ref_id", $this->ref_id);
83 if ($rbacsystem->checkAccess(
'read', $this->ref_id)) {
84 $this->tabs_gui->addTab(
87 $this->ctrl->getLinkTarget($this,
"")
91 if ($rbacsystem->checkAccess(
'write', $this->ref_id)) {
92 $force_active = (
$_GET[
"cmd"] ==
"edit")
95 $this->tabs_gui->addTarget(
97 $this->ctrl->getLinkTarget($this,
"edit"),
113 $next_class = $this->ctrl->getNextClass($this);
114 $cmd = $this->ctrl->getCmd();
119 switch ($next_class) {
120 case 'ilcontainerlinklistgui':
121 include_once(
"Services/Container/classes/class.ilContainerLinkListGUI.php");
123 $ret = &$this->ctrl->forwardCommand($link_list_gui);
127 case "ilcontainerpagegui":
131 $this->tpl->setContent(
$ret);
135 case 'ilpermissiongui':
137 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
139 $ret = &$this->ctrl->forwardCommand($perm_gui);
145 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
146 $this->tpl->setVariable(
147 "LOCATION_CONTENT_STYLESHEET",
153 case 'ilobjectcopygui':
155 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
157 $cp->setType(
'root');
158 $this->ctrl->forwardCommand($cp);
161 case "ilobjstylesheetgui":
165 case "ilcommonactiondispatchergui":
166 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
168 $this->ctrl->forwardCommand($gui);
171 case 'ilobjecttranslationgui':
176 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
178 $this->ctrl->forwardCommand($transgui);
182 if ($cmd ==
"infoScreen") {
188 $this->ctrl->redirectToURL(
"login.php?client_id=" . CLIENT_ID .
"&cmd=force_login");
192 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
193 $this->tpl->setVariable(
194 "LOCATION_CONTENT_STYLESHEET",
217 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
218 ilObjectListGUI::prepareJSLinks(
220 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
221 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false)
224 $ilTabs->activateTab(
"view_content");
225 $ret = parent::renderObject();
238 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
239 parent::viewObject();
256 parent::setTitleAndDescription();
257 $this->tpl->setDescription(
"");
259 if ($this->object->getTitle() ==
"ILIAS") {
260 $this->tpl->setTitle($lng->txt(
"repository"));
262 if ($this->object->getDescription() !=
"") {
263 $this->tpl->setDescription($this->object->getDescription());
271 $this->tabs_gui->addSubTab(
273 $this->lng->txt(
"settings"),
274 $this->ctrl->getLinkTarget($this,
"edit")
281 $this->tabs_gui->addSubTab(
283 $this->lng->txt(
"obj_multilinguality"),
284 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"")
288 $this->tabs_gui->activateTab(
"settings");
289 $this->tabs_gui->activateSubTab($active_tab);
297 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
299 $form->setFormAction($this->ctrl->getFormAction($this));
300 $form->setTitle($this->lng->txt(
"repository"));
304 $pres->setTitle($this->lng->txt(
'obj_presentation'));
305 $form->addItem($pres);
315 ilcontainer::SORT_MANUAL
320 $this->showCustomIconsEditing(1,
$form,
false);
322 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTitleIconVisibility();
329 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
330 $form->addCommandButton(
"addTranslation", $this->lng->txt(
"add_translation"));
352 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->
ilias->error_obj->MESSAGE);
355 if (
$form->checkInput()) {
361 if ($ilSetting->get(
'custom_icons')) {
364 $customIconFactory = $DIC[
'object.customicons.factory'];
365 $customIcon = $customIconFactory->getByObjId($this->object->getId(), $this->
object->getType());
368 $fileData = (array)
$form->getInput(
'cont_icon');
369 $item =
$form->getItemByPostVar(
'cont_icon');
371 if ($item->getDeletionFlag()) {
372 $customIcon->remove();
375 if ($fileData[
'tmp_name']) {
376 $customIcon->saveFromHttpRequest();
382 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTitleIconVisibility();
391 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
396 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
397 $this->ctrl->redirect($this,
"edit");
402 $form->setValuesByPost();
403 $this->tpl->setContent(
$form->getHTML());
415 $this->ctrl->redirectByClass(
"ilobjecttranslationgui",
"");
417 $this->lng->loadLanguageModule($this->object->getType());
420 include_once(
"./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
427 if ($a_get_post_values) {
429 foreach (
$_POST[
"title"] as $k => $v) {
430 $vals[] = array(
"title" => $v,
431 "desc" =>
$_POST[
"desc"][$k],
432 "lang" =>
$_POST[
"lang"][$k],
433 "default" => (
$_POST[
"default"] == $k));
437 $data = $this->
object->getTranslations();
438 foreach (
$data[
"Fobject"] as $k => $v) {
439 $data[
"Fobject"][$k][
"default"] = ($k ==
$data[
"default_language"]);
443 $tpl->setContent(
$table->getHTML());
452 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->
ilias->error_obj->MESSAGE);
456 if (!isset(
$_POST[
"default"]) && count(
$_POST[
"lang"]) > 0) {
462 if (array_key_exists(
"",
$_POST[
"lang"])) {
468 if (count(array_unique(
$_POST[
"lang"])) < count(
$_POST[
"lang"])) {
474 $this->
object->removeTranslations();
476 if (
sizeof(
$_POST[
"title"])) {
477 foreach (
$_POST[
"title"] as $k => $v) {
479 $is_default = (
$_POST[
"default"] == $k);
483 $this->
object->update();
486 $this->
object->addTranslation(
495 $this->
object->setTitle(
"ILIAS");
496 $this->
object->setDescription(
"");
497 $this->
object->update();
500 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
501 $this->ctrl->redirect($this,
"editTranslations");
509 if (
sizeof(
$_POST[
"title"])) {
510 $k = max(array_keys(
$_POST[
"title"])) + 1;
524 foreach (
$_POST[
"title"] as $k => $v) {
525 if (
$_POST[
"check"][$k]) {
526 unset(
$_POST[
"title"][$k]);
527 unset(
$_POST[
"desc"][$k]);
528 unset(
$_POST[
"lang"][$k]);
529 if (
$_POST[
"default"] == $k) {
535 if ($del_default &&
sizeof(
$_POST[
"title"])) {
536 $_POST[
"default"] = array_shift(array_keys(
$_POST[
"title"]));
544 public static function _goto($a_target)
Class ilObjRootFolderGUI.
importCancelledObject()
import cancelled
Class ilContainerLinkListGUI.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
GUI class for the workflow of copying objects.
addTranslationObject()
Add a translation.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
Base exception class for object service.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
importCategoriesObject()
import categories
static _importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)
prepareOutput($a_show_subobjects=true)
prepare output
setTitleAndDescription()
called by prepare output
viewObject()
View root folder.
static _goto($a_target)
goto target group
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
importCategoriesFormObject()
import categories form
setEditTabs($active_tab="settings_misc")
if(isset($_POST['submit'])) $form
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
redirection script todo: (a better solution should control the processing via a xml file) ...
importCategoriesWithRolObject()
import categories
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getContentStylePath($a_style_id, $add_random=true)
get content style path
renderObject()
Render root folder.
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
deleteTranslationsObject()
Remove translation.
TableGUI class for title/description translations.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
static _importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
updateObject()
updates object entry in object_data
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
getObjectService()
Get object service.
if(empty($password)) $table
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
saveTranslationsObject()
Save title and translations.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
editTranslationsObject($a_get_post_values=false)
Edit title and translations.