ILIAS  release_7 Revision v7.30-3-g800a261c036
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 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 ()
 
 competencesObject ()
 Redirect to competences. 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 ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- 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 ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path 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...
 

Protected Member Functions

 setEditTabs ($active_tab="settings_misc")
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 
 supportsPageEditor ()
 
 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)
 
 initFilter ()
 Init filter. More...
 
- 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...
 

Additional Inherited Members

- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
 
- 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
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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 22 of file class.ilObjRootFolderGUI.php.

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

23  {
24  global $lng;
25 
26  $this->type = "root";
27  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
28 
29  $lng->loadLanguageModule("cntr");
30  $lng->loadLanguageModule("obj");
31  }
__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 538 of file class.ilObjRootFolderGUI.php.

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

539  {
540  global $ilAccess, $ilErr, $lng;
541 
543  }
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 501 of file class.ilObjRootFolderGUI.php.

References $_POST, and editTranslationsObject().

502  {
503  if (sizeof($_POST["title"])) {
504  $k = max(array_keys($_POST["title"])) + 1;
505  } else {
506  $k = 0;
507  }
508  $_POST["title"][$k] = "";
509  $this->editTranslationsObject(true);
510  }
$_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 515 of file class.ilObjRootFolderGUI.php.

References $_POST, and saveTranslationsObject().

516  {
517  $del_default = true;
518  foreach ($_POST["title"] as $k => $v) {
519  if ($_POST["check"][$k]) {
520  unset($_POST["title"][$k]);
521  unset($_POST["desc"][$k]);
522  unset($_POST["lang"][$k]);
523  if ($_POST["default"] == $k) {
524  $del_default = true;
525  }
526  }
527  }
528  // set new default
529  if ($del_default && sizeof($_POST["title"])) {
530  $_POST["default"] = array_shift(array_keys($_POST["title"]));
531  }
532  $this->saveTranslationsObject();
533  }
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 404 of file class.ilObjRootFolderGUI.php.

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

Referenced by addTranslationObject(), and saveTranslationsObject().

405  {
406  global $tpl;
407 
408 
409  $this->ctrl->redirectByClass("ilobjecttranslationgui", "");
410 
411  $this->lng->loadLanguageModule($this->object->getType());
412  $this->setEditTabs("settings_trans");
413 
414  include_once("./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
415  $table = new ilObjectTranslationTableGUI(
416  $this,
417  "editTranslations",
418  true,
419  "Translation"
420  );
421  if ($a_get_post_values) {
422  $vals = array();
423  foreach ($_POST["title"] as $k => $v) {
424  $vals[] = array("title" => $v,
425  "desc" => $_POST["desc"][$k],
426  "lang" => $_POST["lang"][$k],
427  "default" => ($_POST["default"] == $k));
428  }
429  $table->setData($vals);
430  } else {
431  $data = $this->object->getTranslations();
432  foreach ($data["Fobject"] as $k => $v) {
433  $data["Fobject"][$k]["default"] = ($k == $data["default_language"]);
434  }
435  $table->setData($data["Fobject"]);
436  }
437  $tpl->setContent($table->getHTML());
438  }
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 103 of file class.ilObjRootFolderGUI.php.

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

104  {
105  global $rbacsystem;
106 
107  $next_class = $this->ctrl->getNextClass($this);
108  $cmd = $this->ctrl->getCmd();
109 
110 
111  switch ($next_class) {
112  case 'ilreputilgui':
113  $ru = new \ilRepUtilGUI($this);
114  $this->ctrl->setReturn($this, 'trash');
115  $this->ctrl->forwardCommand($ru);
116  break;
117 
118 
119  case 'ilcontainerlinklistgui':
120  include_once("Services/Container/classes/class.ilContainerLinkListGUI.php");
121  $link_list_gui = new ilContainerLinkListGUI();
122  $ret = &$this->ctrl->forwardCommand($link_list_gui);
123  break;
124 
125  // container page editing
126  case "ilcontainerpagegui":
127  $this->prepareOutput(false);
128  $ret = $this->forwardToPageObject();
129  if ($ret != "") {
130  $this->tpl->setContent($ret);
131  }
132  break;
133 
134  case 'ilpermissiongui':
135  $this->prepareOutput();
136  $this->tabs_gui->activateTab('perm_settings');
137  $perm_gui = new ilPermissionGUI($this);
138  $ret = $this->ctrl->forwardCommand($perm_gui);
139  break;
140 
141  case "ilcolumngui":
142  $this->checkPermission("read");
143  $this->prepareOutput();
144  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
145  $this->tpl->setVariable(
146  "LOCATION_CONTENT_STYLESHEET",
147  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
148  );
149  $this->renderObject();
150  break;
151 
152  case 'ilobjectcopygui':
153  $this->prepareOutput();
154  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
155  $cp = new ilObjectCopyGUI($this);
156  $cp->setType('root');
157  $this->ctrl->forwardCommand($cp);
158  break;
159 
160  case "ilobjstylesheetgui":
161  $this->forwardToStyleSheet();
162  break;
163 
164  case "ilcommonactiondispatchergui":
165  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
167  $this->ctrl->forwardCommand($gui);
168  break;
169 
170  case 'ilobjecttranslationgui':
171  $this->checkPermissionBool("write");
172  $this->prepareOutput();
173  //$this->tabs_gui->setTabActive('export');
174  $this->setEditTabs("settings_trans");
175  include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
176  $transgui = new ilObjectTranslationGUI($this);
177  $this->ctrl->forwardCommand($transgui);
178  break;
179 
180  default:
181  if ($cmd == "infoScreen") {
182  $this->checkPermission("visible");
183  } else {
184  try {
185  $this->checkPermission("read");
186  } catch (ilObjectException $exception) {
187  $this->ctrl->redirectToURL("login.php?client_id=" . CLIENT_ID . "&cmd=force_login");
188  }
189  }
190  $this->prepareOutput();
191  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
192  $this->tpl->setVariable(
193  "LOCATION_CONTENT_STYLESHEET",
194  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
195  );
196 
197  if (!$cmd) {
198  $cmd = "render";
199  }
200 
201  $cmd .= "Object";
202  $this->$cmd();
203 
204  break;
205  }
206  return true;
207  }
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")
const CLIENT_ID
Definition: constants.php:39
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 69 of file class.ilObjRootFolderGUI.php.

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

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

◆ importCancelledObject()

ilObjRootFolderGUI::importCancelledObject ( )

import cancelled

private

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

47  {
48  $this->ctrl->returnToParent($this);
49  }

◆ importCategoriesFormObject()

ilObjRootFolderGUI::importCategoriesFormObject ( )

import categories form

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

References ilObjCategoryGUI\_importCategoriesForm().

37  {
38  ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
39  }
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 54 of file class.ilObjRootFolderGUI.php.

References ilObjCategoryGUI\_importCategories().

55  {
56  ilObjCategoryGUI::_importCategories($this->ref_id, 0);
57  }
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 63 of file class.ilObjRootFolderGUI.php.

References ilObjCategoryGUI\_importCategories().

64  {
65  ilObjCategoryGUI::_importCategories($this->ref_id, 1);
66  }
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 291 of file class.ilObjRootFolderGUI.php.

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

Referenced by getEditFormValues().

292  {
293  $this->setEditTabs();
294  $obj_service = $this->getObjectService();
295 
296  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
297  $form = new ilPropertyFormGUI();
298  $form->setFormAction($this->ctrl->getFormAction($this));
299  $form->setTitle($this->lng->txt('obj_presentation'));
300 
301  // list presentation
302  $form = $this->initListPresentationForm($form);
303 
304  $this->initSortingForm(
305  $form,
306  array(
309  ilcontainer::SORT_MANUAL
310  )
311  );
312 
313 
314  $this->showCustomIconsEditing(1, $form, false);
315 
316  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
317 
318  //$hide = new ilCheckboxInputGUI($this->lng->txt("cntr_hide_title_and_icon"), "hide_header_icon_and_title");
319  //$hide->setChecked(ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"));
320  //$form->addItem($hide);
321 
322 
323  $form->addCommandButton("update", $this->lng->txt("save"));
324  $form->addCommandButton("addTranslation", $this->lng->txt("add_translation"));
325 
326  return $form;
327  }
This class represents a property form user interface.
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 212 of file class.ilObjRootFolderGUI.php.

References $ret.

Referenced by executeCommand(), and viewObject().

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

◆ saveTranslationsObject()

ilObjRootFolderGUI::saveTranslationsObject ( )

Save title and translations.

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

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

Referenced by deleteTranslationsObject().

444  {
445  if (!$this->checkPermissionBool("write")) {
446  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
447  }
448 
449  // default language set?
450  if (!isset($_POST["default"]) && count($_POST["lang"]) > 0) {
451  ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
452  return $this->editTranslationsObject(true);
453  }
454 
455  // all languages set?
456  if (array_key_exists("", $_POST["lang"])) {
457  ilUtil::sendFailure($this->lng->txt("msg_no_language_selected"));
458  return $this->editTranslationsObject(true);
459  }
460 
461  // no single language is selected more than once?
462  if (count(array_unique($_POST["lang"])) < count($_POST["lang"])) {
463  ilUtil::sendFailure($this->lng->txt("msg_multi_language_selected"));
464  return $this->editTranslationsObject(true);
465  }
466 
467  // save the stuff
468  $this->object->removeTranslations();
469 
470  if (sizeof($_POST["title"])) {
471  foreach ($_POST["title"] as $k => $v) {
472  // update object data if default
473  $is_default = ($_POST["default"] == $k);
474  if ($is_default) {
475  $this->object->setTitle(ilUtil::stripSlashes($v));
476  $this->object->setDescription(ilUtil::stripSlashes($_POST["desc"][$k]));
477  $this->object->update();
478  }
479 
480  $this->object->addTranslation(
482  ilUtil::stripSlashes($_POST["desc"][$k]),
483  ilUtil::stripSlashes($_POST["lang"][$k]),
484  $is_default
485  );
486  }
487  } else {
488  // revert to original title
489  $this->object->setTitle("ILIAS");
490  $this->object->setDescription("");
491  $this->object->update();
492  }
493 
494  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
495  $this->ctrl->redirect($this, "editTranslations");
496  }
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 268 of file class.ilObjRootFolderGUI.php.

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

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

◆ setTitleAndDescription()

ilObjRootFolderGUI::setTitleAndDescription ( )

called by prepare output

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

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

252  {
253  global $lng;
254 
255  parent::setTitleAndDescription();
256  $this->tpl->setDescription("");
257  if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
258  if ($this->object->getTitle() == "ILIAS") {
259  $this->tpl->setTitle($lng->txt("repository"));
260  } else {
261  if ($this->object->getDescription() != "") {
262  $this->tpl->setDescription($this->object->getDescription()); // #13479
263  }
264  }
265  }
266  }
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 233 of file class.ilObjRootFolderGUI.php.

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

234  {
235  $this->checkPermission('read');
236 
237  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
238  parent::viewObject();
239  return true;
240  }
241 
242  $this->renderObject();
243  return true;
244  }
$_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: