ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjRootFolderGUI Class Reference

Class ilObjRootFolderGUI. More...

+ Inheritance diagram for ilObjRootFolderGUI:
+ Collaboration diagram for ilObjRootFolderGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
 importCategoriesFormObject ()
 import categories form More...
 
 importCancelledObject ()
 import cancelled More...
 
 importCategoriesObject ()
 import categories More...
 
 importCategoriesWithRolObject ()
 import categories More...
 
 getTabs ()
 
 executeCommand ()
 
 renderObject ()
 Render root folder. More...
 
 viewObject ()
 View root folder. More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initEditForm ()
 
 getEditFormValues ()
 
 editTranslationsObject ($a_get_post_values=false)
 Edit title and translations. More...
 
 saveTranslationsObject ()
 Save title and translations. More...
 
 addTranslationObject ()
 Add a translation. More...
 
 deleteTranslationsObject ()
 Remove translation. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ilContainerGUI
 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
 executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel ()
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink ()
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 getBucketTitle ()
 get proper label to add in the background task popover More...
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 show clipboard More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 public More...
 
 cloneWizardPageListObject ()
 public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify list gui for presentation in container. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 trash table apply filter More...
 
 trashResetFilterObject ()
 trash table reset filter More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
 getAdminTabs ()
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 Add desktop item public. More...
 
 removeFromDeskObject ()
 Remove from desktop public. More...
 

Static Public Member Functions

static _goto ($a_target)
 goto target group More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path More...
 

Protected Member Functions

 setEditTabs ($active_tab="settings_misc")
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 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 save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 Save list presentation setting. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (\ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI ($cmd)
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
- Protected Attributes inherited from ilContainerGUI
 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $global_screen
 
 $app_event_handler
 
 $ui
 
 $container_filter_service
 
 $container_user_filter = null
 
 $ui_filter
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjRootFolderGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor public.

Definition at line 25 of file class.ilObjRootFolderGUI.php.

References ilObjectGUI\$lng, and ILIAS\GlobalScreen\Provider\__construct().

26  {
27  global $lng;
28 
29  $this->type = "root";
30  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
31 
32  $lng->loadLanguageModule("cntr");
33  $lng->loadLanguageModule("obj");
34  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjRootFolderGUI::_goto (   $a_target)
static

goto target group

Definition at line 546 of file class.ilObjRootFolderGUI.php.

References ilObjectGUI\$ilErr, ilObjectGUI\$lng, and ilObjectGUI\_gotoRepositoryRoot().

547  {
548  global $ilAccess, $ilErr, $lng;
549 
551  }
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
+ Here is the call graph for this function:

◆ addTranslationObject()

ilObjRootFolderGUI::addTranslationObject ( )

Add a translation.

Definition at line 509 of file class.ilObjRootFolderGUI.php.

References $_POST, and editTranslationsObject().

510  {
511  if (sizeof($_POST["title"])) {
512  $k = max(array_keys($_POST["title"])) + 1;
513  } else {
514  $k = 0;
515  }
516  $_POST["title"][$k] = "";
517  $this->editTranslationsObject(true);
518  }
$_POST["username"]
editTranslationsObject($a_get_post_values=false)
Edit title and translations.
+ Here is the call graph for this function:

◆ deleteTranslationsObject()

ilObjRootFolderGUI::deleteTranslationsObject ( )

Remove translation.

Definition at line 523 of file class.ilObjRootFolderGUI.php.

References $_POST, and saveTranslationsObject().

524  {
525  $del_default = true;
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) {
532  $del_default = true;
533  }
534  }
535  }
536  // set new default
537  if ($del_default && sizeof($_POST["title"])) {
538  $_POST["default"] = array_shift(array_keys($_POST["title"]));
539  }
540  $this->saveTranslationsObject();
541  }
saveTranslationsObject()
Save title and translations.
$_POST["username"]
+ Here is the call graph for this function:

◆ editTranslationsObject()

ilObjRootFolderGUI::editTranslationsObject (   $a_get_post_values = false)

Edit title and translations.

Definition at line 412 of file class.ilObjRootFolderGUI.php.

References $_POST, ilObjectGUI\$data, ilObjectGUI\$tpl, and setEditTabs().

Referenced by addTranslationObject(), and saveTranslationsObject().

413  {
414  global $tpl;
415 
416 
417  $this->ctrl->redirectByClass("ilobjecttranslationgui", "");
418 
419  $this->lng->loadLanguageModule($this->object->getType());
420  $this->setEditTabs("settings_trans");
421 
422  include_once("./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
423  $table = new ilObjectTranslationTableGUI(
424  $this,
425  "editTranslations",
426  true,
427  "Translation"
428  );
429  if ($a_get_post_values) {
430  $vals = array();
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));
436  }
437  $table->setData($vals);
438  } else {
439  $data = $this->object->getTranslations();
440  foreach ($data["Fobject"] as $k => $v) {
441  $data["Fobject"][$k]["default"] = ($k == $data["default_language"]);
442  }
443  $table->setData($data["Fobject"]);
444  }
445  $tpl->setContent($table->getHTML());
446  }
setEditTabs($active_tab="settings_misc")
TableGUI class for title/description translations.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjRootFolderGUI::executeCommand ( )

Definition at line 106 of file class.ilObjRootFolderGUI.php.

References ilContainerGUI\$rbacsystem, $ret, ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilContainerGUI\prepareOutput(), renderObject(), and setEditTabs().

107  {
108  global $rbacsystem;
109 
110  $next_class = $this->ctrl->getNextClass($this);
111  $cmd = $this->ctrl->getCmd();
112 
113 
114  switch ($next_class) {
115  case 'ilreputilgui':
116  $ru = new \ilRepUtilGUI($this);
117  $this->ctrl->setReturn($this, 'trash');
118  $this->ctrl->forwardCommand($ru);
119  break;
120 
121 
122  case 'ilcontainerlinklistgui':
123  include_once("Services/Container/classes/class.ilContainerLinkListGUI.php");
124  $link_list_gui = new ilContainerLinkListGUI();
125  $ret = &$this->ctrl->forwardCommand($link_list_gui);
126  break;
127 
128  // container page editing
129  case "ilcontainerpagegui":
130  $this->prepareOutput(false);
131  $ret = $this->forwardToPageObject();
132  if ($ret != "") {
133  $this->tpl->setContent($ret);
134  }
135  break;
136 
137  case 'ilpermissiongui':
138  $this->prepareOutput();
139  $this->tabs_gui->activateTab('perm_settings');
140  $perm_gui = new ilPermissionGUI($this);
141  $ret = $this->ctrl->forwardCommand($perm_gui);
142  break;
143 
144  case "ilcolumngui":
145  $this->checkPermission("read");
146  $this->prepareOutput();
147  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
148  $this->tpl->setVariable(
149  "LOCATION_CONTENT_STYLESHEET",
150  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
151  );
152  $this->renderObject();
153  break;
154 
155  case 'ilobjectcopygui':
156  $this->prepareOutput();
157  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
158  $cp = new ilObjectCopyGUI($this);
159  $cp->setType('root');
160  $this->ctrl->forwardCommand($cp);
161  break;
162 
163  case "ilobjstylesheetgui":
164  $this->forwardToStyleSheet();
165  break;
166 
167  case "ilcommonactiondispatchergui":
168  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
170  $this->ctrl->forwardCommand($gui);
171  break;
172 
173  case 'ilobjecttranslationgui':
174  $this->checkPermissionBool("write");
175  $this->prepareOutput();
176  //$this->tabs_gui->setTabActive('export');
177  $this->setEditTabs("settings_trans");
178  include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
179  $transgui = new ilObjectTranslationGUI($this);
180  $this->ctrl->forwardCommand($transgui);
181  break;
182 
183  default:
184  if ($cmd == "infoScreen") {
185  $this->checkPermission("visible");
186  } else {
187  try {
188  $this->checkPermission("read");
189  } catch (ilObjectException $exception) {
190  $this->ctrl->redirectToURL("login.php?client_id=" . CLIENT_ID . "&cmd=force_login");
191  }
192  }
193  $this->prepareOutput();
194  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
195  $this->tpl->setVariable(
196  "LOCATION_CONTENT_STYLESHEET",
197  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
198  );
199 
200  if (!$cmd) {
201  $cmd = "render";
202  }
203 
204  $cmd .= "Object";
205  $this->$cmd();
206 
207  break;
208  }
209  return true;
210  }
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
Class ilContainerLinkListGUI.
GUI class for the workflow of copying objects.
Base exception class for object service.
prepareOutput($a_show_subobjects=true)
prepare output
setEditTabs($active_tab="settings_misc")
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
renderObject()
Render root folder.
$ret
Definition: parser.php:6
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.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
+ Here is the call graph for this function:

◆ getEditFormValues()

ilObjRootFolderGUI::getEditFormValues ( )

◆ getTabs()

ilObjRootFolderGUI::getTabs ( )

Definition at line 72 of file class.ilObjRootFolderGUI.php.

References $_GET, ilObjectGUI\$lng, and ilContainerGUI\$rbacsystem.

73  {
74  global $rbacsystem, $lng, $ilHelp;
75 
76  $ilHelp->setScreenIdComponent("root");
77 
78  $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
79 
80  if ($rbacsystem->checkAccess('read', $this->ref_id)) {
81  $this->tabs_gui->addTab(
82  'view_content',
83  $lng->txt("content"),
84  $this->ctrl->getLinkTarget($this, "")
85  );
86  }
87 
88  if ($rbacsystem->checkAccess('write', $this->ref_id)) {
89  $force_active = ($_GET["cmd"] == "edit")
90  ? true
91  : false;
92  $this->tabs_gui->addTarget(
93  "settings",
94  $this->ctrl->getLinkTarget($this, "edit"),
95  "edit",
96  get_class($this),
97  "",
98  $force_active
99  );
100  }
101 
102  // parent tabs (all container: edit_permission, clipboard, trash
103  parent::getTabs();
104  }
$_GET["client_id"]

◆ importCancelledObject()

ilObjRootFolderGUI::importCancelledObject ( )

import cancelled

private

Definition at line 49 of file class.ilObjRootFolderGUI.php.

50  {
51  $this->ctrl->returnToParent($this);
52  }

◆ importCategoriesFormObject()

ilObjRootFolderGUI::importCategoriesFormObject ( )

import categories form

Definition at line 39 of file class.ilObjRootFolderGUI.php.

References ilObjCategoryGUI\_importCategoriesForm().

40  {
41  ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
42  }
static _importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)
+ Here is the call graph for this function:

◆ importCategoriesObject()

ilObjRootFolderGUI::importCategoriesObject ( )

import categories

Definition at line 57 of file class.ilObjRootFolderGUI.php.

References ilObjCategoryGUI\_importCategories().

58  {
59  ilObjCategoryGUI::_importCategories($this->ref_id, 0);
60  }
static _importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
+ Here is the call graph for this function:

◆ importCategoriesWithRolObject()

ilObjRootFolderGUI::importCategoriesWithRolObject ( )

import categories

Definition at line 66 of file class.ilObjRootFolderGUI.php.

References ilObjCategoryGUI\_importCategories().

67  {
68  ilObjCategoryGUI::_importCategories($this->ref_id, 1);
69  }
static _importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
+ Here is the call graph for this function:

◆ initEditForm()

ilObjRootFolderGUI::initEditForm ( )

Definition at line 294 of file class.ilObjRootFolderGUI.php.

References ilObjectGUI\getObjectService(), ilContainerGUI\initListPresentationForm(), ilContainerGUI\initSortingForm(), setEditTabs(), ilContainer\SORT_CREATION, and ilContainer\SORT_TITLE.

Referenced by getEditFormValues().

295  {
296  $this->setEditTabs();
297  $obj_service = $this->getObjectService();
298 
299  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
300  $form = new ilPropertyFormGUI();
301  $form->setFormAction($this->ctrl->getFormAction($this));
302  $form->setTitle($this->lng->txt("repository"));
303 
304  // presentation
305  $pres = new ilFormSectionHeaderGUI();
306  $pres->setTitle($this->lng->txt('obj_presentation'));
307  $form->addItem($pres);
308 
309  // list presentation
310  $form = $this->initListPresentationForm($form);
311 
312  $this->initSortingForm(
313  $form,
314  array(
317  ilcontainer::SORT_MANUAL
318  )
319  );
320 
321 
322  $this->showCustomIconsEditing(1, $form, false);
323 
324  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
325 
326  //$hide = new ilCheckboxInputGUI($this->lng->txt("cntr_hide_title_and_icon"), "hide_header_icon_and_title");
327  //$hide->setChecked(ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"));
328  //$form->addItem($hide);
329 
330 
331  $form->addCommandButton("update", $this->lng->txt("save"));
332  $form->addCommandButton("addTranslation", $this->lng->txt("add_translation"));
333 
334  return $form;
335  }
This class represents a property form user interface.
This class represents a section header in a property form.
setEditTabs($active_tab="settings_misc")
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
getObjectService()
Get object service.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderObject()

ilObjRootFolderGUI::renderObject ( )

Render root folder.

Definition at line 215 of file class.ilObjRootFolderGUI.php.

References $ret.

Referenced by executeCommand(), and viewObject().

216  {
217  global $ilTabs;
218 
219  include_once "Services/Object/classes/class.ilObjectListGUI.php";
220  ilObjectListGUI::prepareJSLinks(
221  "",
222  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
223  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)
224  );
225 
226  $ilTabs->activateTab("view_content");
227  $ret = parent::renderObject();
228  return $ret;
229  }
$ret
Definition: parser.php:6
+ Here is the caller graph for this function:

◆ saveTranslationsObject()

ilObjRootFolderGUI::saveTranslationsObject ( )

Save title and translations.

Definition at line 451 of file class.ilObjRootFolderGUI.php.

References $_POST, ilObjectGUI\checkPermissionBool(), editTranslationsObject(), ilUtil\sendFailure(), and ilUtil\stripSlashes().

Referenced by deleteTranslationsObject().

452  {
453  if (!$this->checkPermissionBool("write")) {
454  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
455  }
456 
457  // default language set?
458  if (!isset($_POST["default"]) && count($_POST["lang"]) > 0) {
459  ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
460  return $this->editTranslationsObject(true);
461  }
462 
463  // all languages set?
464  if (array_key_exists("", $_POST["lang"])) {
465  ilUtil::sendFailure($this->lng->txt("msg_no_language_selected"));
466  return $this->editTranslationsObject(true);
467  }
468 
469  // no single language is selected more than once?
470  if (count(array_unique($_POST["lang"])) < count($_POST["lang"])) {
471  ilUtil::sendFailure($this->lng->txt("msg_multi_language_selected"));
472  return $this->editTranslationsObject(true);
473  }
474 
475  // save the stuff
476  $this->object->removeTranslations();
477 
478  if (sizeof($_POST["title"])) {
479  foreach ($_POST["title"] as $k => $v) {
480  // update object data if default
481  $is_default = ($_POST["default"] == $k);
482  if ($is_default) {
483  $this->object->setTitle(ilUtil::stripSlashes($v));
484  $this->object->setDescription(ilUtil::stripSlashes($_POST["desc"][$k]));
485  $this->object->update();
486  }
487 
488  $this->object->addTranslation(
490  ilUtil::stripSlashes($_POST["desc"][$k]),
491  ilUtil::stripSlashes($_POST["lang"][$k]),
492  $is_default
493  );
494  }
495  } else {
496  // revert to original title
497  $this->object->setTitle("ILIAS");
498  $this->object->setDescription("");
499  $this->object->update();
500  }
501 
502  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
503  $this->ctrl->redirect($this, "editTranslations");
504  }
redirection script todo: (a better solution should control the processing via a xml file) ...
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$_POST["username"]
editTranslationsObject($a_get_post_values=false)
Edit title and translations.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEditTabs()

ilObjRootFolderGUI::setEditTabs (   $active_tab = "settings_misc")
protected

Definition at line 271 of file class.ilObjRootFolderGUI.php.

Referenced by editTranslationsObject(), executeCommand(), getEditFormValues(), and initEditForm().

272  {
273  $this->tabs_gui->addSubTab(
274  "settings_misc",
275  $this->lng->txt("settings"),
276  $this->ctrl->getLinkTarget($this, "edit")
277  );
278 
279  /*$this->tabs_gui->addSubTab("settings_trans",
280  $this->lng->txt("title_and_translations"),
281  $this->ctrl->getLinkTarget($this, "editTranslations"));*/
282 
283  $this->tabs_gui->addSubTab(
284  "settings_trans",
285  $this->lng->txt("obj_multilinguality"),
286  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
287  );
288 
289 
290  $this->tabs_gui->activateTab("settings");
291  $this->tabs_gui->activateSubTab($active_tab);
292  }
+ Here is the caller graph for this function:

◆ setTitleAndDescription()

ilObjRootFolderGUI::setTitleAndDescription ( )

called by prepare output

Definition at line 254 of file class.ilObjRootFolderGUI.php.

References ilObjectGUI\$lng, and ilContainer\_lookupContainerSetting().

255  {
256  global $lng;
257 
258  parent::setTitleAndDescription();
259  $this->tpl->setDescription("");
260  if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
261  if ($this->object->getTitle() == "ILIAS") {
262  $this->tpl->setTitle($lng->txt("repository"));
263  } else {
264  if ($this->object->getDescription() != "") {
265  $this->tpl->setDescription($this->object->getDescription()); // #13479
266  }
267  }
268  }
269  }
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:

◆ viewObject()

ilObjRootFolderGUI::viewObject ( )

View root folder.

Returns
bool|void
Exceptions
ilObjectException

Definition at line 236 of file class.ilObjRootFolderGUI.php.

References $_GET, ilObjectGUI\checkPermission(), and renderObject().

237  {
238  $this->checkPermission('read');
239 
240  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
241  parent::viewObject();
242  return true;
243  }
244 
245  $this->renderObject();
246  return true;
247  }
$_GET["client_id"]
renderObject()
Render root folder.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: