ILIAS  release_4-4 Revision
ilObjRootFolderGUI Class Reference

Class ilObjRootFolderGUI. More...

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

Public Member Functions

 ilObjRootFolderGUI ($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 (&$tabs_gui)
 
executeCommand ()
 
 renderObject ()
 Render root folder. More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initEditForm ()
 
 getEditFormValues ()
 
 updateObject ()
 updates object entry in object_data More...
 
 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...
 
 _goto ($a_target)
 goto target group More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 editObject ()
 edit object More...
 
 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 ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
- Public Member Functions inherited from ilContainerGUI
 ilContainerGUI ($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...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel (&$tpl)
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink (&$tpl)
 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 ()
 
 renderItemList ($a_type="all")
 
 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...
 
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard 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 (&$tabs_gui)
 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...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 lockObject ()
 
 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 ()
 
 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 ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings ($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 Item ListGUI 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...
 
 showRepTree ($a_initial_call=false)
 Show tree. More...
 
 trashObject ()
 Show trash content of object. 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...
 

Protected Member Functions

 setEditTabs ($active_tab="settings_misc")
 
 showSortingSettings ()
 show sorting settings More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 showMountWebfolderIcon ()
 
 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...
 
 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...
 
 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...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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...
 

Additional Inherited Members

- 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...
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $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
 

Detailed Description

Member Function Documentation

◆ _goto()

ilObjRootFolderGUI::_goto (   $a_target)

goto target group

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

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

530  {
531  global $ilAccess, $ilErr, $lng;
532 
534  }
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 485 of file class.ilObjRootFolderGUI.php.

References $_POST, and editTranslationsObject().

486  {
487  if(sizeof($_POST["title"]))
488  {
489  $k = max(array_keys($_POST["title"]))+1;
490  }
491  else
492  {
493  $k = 0;
494  }
495  $_POST["title"][$k] = "";
496  $this->editTranslationsObject(true);
497  }
$_POST['username']
Definition: cron.php:12
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 502 of file class.ilObjRootFolderGUI.php.

References $_POST, and saveTranslationsObject().

503  {
504  $del_default = true;
505  foreach($_POST["title"] as $k => $v)
506  {
507  if ($_POST["check"][$k])
508  {
509  unset($_POST["title"][$k]);
510  unset($_POST["desc"][$k]);
511  unset($_POST["lang"][$k]);
512  if($_POST["default"] == $k)
513  {
514  $del_default = true;
515  }
516  }
517  }
518  // set new default
519  if($del_default && sizeof($_POST["title"]))
520  {
521  $_POST["default"] = array_shift(array_keys($_POST["title"]));
522  }
523  $this->saveTranslationsObject();
524  }
$_POST['username']
Definition: cron.php:12
saveTranslationsObject()
Save title and translations.
+ Here is the call graph for this function:

◆ editTranslationsObject()

ilObjRootFolderGUI::editTranslationsObject (   $a_get_post_values = false)

Edit title and translations.

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

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

Referenced by addTranslationObject(), and saveTranslationsObject().

380  {
381  global $tpl;
382 
383 
384  $this->ctrl->redirectByClass("ilobjecttranslationgui", "");
385 
386  $this->lng->loadLanguageModule($this->object->getType());
387  $this->setEditTabs("settings_trans");
388 
389  include_once("./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
390  $table = new ilObjectTranslationTableGUI($this, "editTranslations", true,
391  "Translation");
392  if ($a_get_post_values)
393  {
394  $vals = array();
395  foreach($_POST["title"] as $k => $v)
396  {
397  $vals[] = array("title" => $v,
398  "desc" => $_POST["desc"][$k],
399  "lang" => $_POST["lang"][$k],
400  "default" => ($_POST["default"] == $k));
401  }
402  $table->setData($vals);
403  }
404  else
405  {
406  $data = $this->object->getTranslations();
407  foreach($data["Fobject"] as $k => $v)
408  {
409  $data["Fobject"][$k]["default"] = ($k == $data["default_language"]);
410  }
411  $table->setData($data["Fobject"]);
412  }
413  $tpl->setContent($table->getHTML());
414  }
$_POST['username']
Definition: cron.php:12
setEditTabs($active_tab="settings_misc")
TableGUI class for title/description translations.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

& ilObjRootFolderGUI::executeCommand ( )

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

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

105  {
106  global $rbacsystem;
107 
108  $next_class = $this->ctrl->getNextClass($this);
109  $cmd = $this->ctrl->getCmd();
110 
111  // show repository tree
112  $this->showRepTree(true);
113 
114  switch($next_class)
115  {
116  case 'ilcontainerlinklistgui':
117  include_once("Services/Container/classes/class.ilContainerLinkListGUI.php");
118  $link_list_gui =& new ilContainerLinkListGUI();
119  $ret =& $this->ctrl->forwardCommand($link_list_gui);
120  break;
121 
122  // container page editing
123  case "ilcontainerpagegui":
124  $this->prepareOutput(false);
125  $ret = $this->forwardToPageObject();
126  if ($ret != "")
127  {
128  $this->tpl->setContent($ret);
129  }
130  break;
131 
132  case 'ilpermissiongui':
133  $this->prepareOutput();
134  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
135  $perm_gui =& new ilPermissionGUI($this);
136  $ret =& $this->ctrl->forwardCommand($perm_gui);
137  break;
138 
139  case "ilcolumngui":
140  $this->checkPermission("read");
141  $this->prepareOutput();
142  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
143  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
144  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
145  $this->renderObject();
146  break;
147 
148  case 'ilobjectcopygui':
149  $this->prepareOutput();
150  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
151  $cp = new ilObjectCopyGUI($this);
152  $cp->setType('root');
153  $this->ctrl->forwardCommand($cp);
154  break;
155 
156  case "ilobjstylesheetgui":
157  $this->forwardToStyleSheet();
158  break;
159 
160  case "ilcommonactiondispatchergui":
161  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
163  $this->ctrl->forwardCommand($gui);
164  break;
165 
166  case 'ilobjecttranslationgui':
167  $this->checkPermissionBool("write");
168  $this->prepareOutput();
169  //$this->tabs_gui->setTabActive('export');
170  $this->setEditTabs("settings_trans");
171  include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
172  $transgui = new ilObjectTranslationGUI($this);
173  $this->ctrl->forwardCommand($transgui);
174  break;
175 
176  default:
177 
178  // fix bug http://www.ilias.de/mantis/view.php?id=10305
179  if ($cmd == "infoScreen")
180  {
181  $this->checkPermission("visible");
182  }
183  else
184  {
185  $this->checkPermission("read");
186  }
187  $this->prepareOutput();
188  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
189  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
190  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
191 
192  if(!$cmd)
193  {
194  $cmd = "render";
195  }
196 
197  $cmd .= "Object";
198  $this->$cmd();
199 
200  break;
201  }
202  return true;
203  }
Class ilContainerLinkListGUI.
GUI class for the workflow of copying objects.
$cmd
Definition: sahs_server.php:35
setEditTabs($active_tab="settings_misc")
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
renderObject()
Render root folder.
prepareOutput()
prepare output
getContentStylePath($a_style_id)
get content style path
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.
showRepTree($a_initial_call=false)
Show tree.
+ Here is the call graph for this function:

◆ getEditFormValues()

ilObjRootFolderGUI::getEditFormValues ( )

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

312  {
313  // values are set in initEditForm()
314  }

◆ getTabs()

ilObjRootFolderGUI::getTabs ( $tabs_gui)

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

References $_GET, and ilObjectGUI\$lng.

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

◆ ilObjRootFolderGUI()

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

Constructor public.

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

References ilObjectGUI\$lng, and ilContainerGUI\ilContainerGUI().

29  {
30  global $lng;
31 
32  $this->type = "root";
33  $this->ilContainerGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
34 
35  $lng->loadLanguageModule("cntr");
36  $lng->loadLanguageModule("obj");
37  }
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
+ Here is the call graph for this function:

◆ importCancelledObject()

ilObjRootFolderGUI::importCancelledObject ( )

import cancelled

private

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

53  {
54  $this->ctrl->returnToParent($this);
55  }

◆ importCategoriesFormObject()

ilObjRootFolderGUI::importCategoriesFormObject ( )

import categories form

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

References ilObjCategoryGUI\_importCategoriesForm().

43  {
44  ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
45  }
_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 60 of file class.ilObjRootFolderGUI.php.

References ilObjCategoryGUI\_importCategories().

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

References ilObjCategoryGUI\_importCategories().

70  {
71  ilObjCategoryGUI::_importCategories($this->ref_id,1);
72  }
_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 267 of file class.ilObjRootFolderGUI.php.

References ilContainer\_lookupContainerSetting(), ilCheckboxInputGUI\setChecked(), setEditTabs(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilContainerGUI\showCustomIconsEditing(), ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

Referenced by updateObject().

268  {
269  $this->setEditTabs();
270 
271  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
272  $form = new ilPropertyFormGUI();
273  $form->setFormAction($this->ctrl->getFormAction($this));
274  $form->setTitle($this->lng->txt("repository"));
275 
276 
277  // sorting
278 
279  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
280  $settings = new ilContainerSortingSettings($this->object->getId());
281 
282  $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
283  $sort_title = new ilRadioOption($this->lng->txt('sorting_title_header'),
285  $sort_title->setInfo($this->lng->txt('sorting_info_title'));
286  $sort->addOption($sort_title);
287 
288  $sort_manual = new ilRadioOption($this->lng->txt('sorting_manual_header'),
290  $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
291  $sort->addOption($sort_manual);
292 
293  $sort->setValue($settings->getSortMode());
294  $form->addItem($sort);
295 
296 
297  $this->showCustomIconsEditing(1, $form, false);
298 
299 
300  $hide = new ilCheckboxInputGUI($this->lng->txt("cntr_hide_title_and_icon"), "hide_header_icon_and_title");
301  $hide->setChecked(ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"));
302  $form->addItem($hide);
303 
304 
305  $form->addCommandButton("update", $this->lng->txt("save"));
306  $form->addCommandButton("addTranslation", $this->lng->txt("add_translation"));
307 
308  return $form;
309  }
This class represents an option in a radio group.
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Info.
setInfo($a_info)
Set Information Text.
setChecked($a_checked)
Set Checked.
setEditTabs($active_tab="settings_misc")
This class represents a property in a property form.
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
+ 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 208 of file class.ilObjRootFolderGUI.php.

References $ret.

Referenced by executeCommand().

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

◆ saveTranslationsObject()

ilObjRootFolderGUI::saveTranslationsObject ( )

Save title and translations.

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

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

Referenced by deleteTranslationsObject().

420  {
421  if (!$this->checkPermissionBool("write"))
422  {
423  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
424  }
425 
426  // default language set?
427  if (!isset($_POST["default"]) && count($_POST["lang"]) > 0)
428  {
429  ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
430  return $this->editTranslationsObject(true);
431  }
432 
433  // all languages set?
434  if (array_key_exists("",$_POST["lang"]))
435  {
436  ilUtil::sendFailure($this->lng->txt("msg_no_language_selected"));
437  return $this->editTranslationsObject(true);
438  }
439 
440  // no single language is selected more than once?
441  if (count(array_unique($_POST["lang"])) < count($_POST["lang"]))
442  {
443  ilUtil::sendFailure($this->lng->txt("msg_multi_language_selected"));
444  return $this->editTranslationsObject(true);
445  }
446 
447  // save the stuff
448  $this->object->removeTranslations();
449 
450  if(sizeof($_POST["title"]))
451  {
452  foreach($_POST["title"] as $k => $v)
453  {
454  // update object data if default
455  $is_default = ($_POST["default"] == $k);
456  if($is_default)
457  {
458  $this->object->setTitle(ilUtil::stripSlashes($v));
459  $this->object->setDescription(ilUtil::stripSlashes($_POST["desc"][$k]));
460  $this->object->update();
461  }
462 
463  $this->object->addTranslation(
465  ilUtil::stripSlashes($_POST["desc"][$k]),
466  ilUtil::stripSlashes($_POST["lang"][$k]),
467  $is_default);
468  }
469  }
470  else
471  {
472  // revert to original title
473  $this->object->setTitle("ILIAS");
474  $this->object->setDescription("");
475  $this->object->update();
476  }
477 
478  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
479  $this->ctrl->redirect($this, "editTranslations");
480  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
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.
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 248 of file class.ilObjRootFolderGUI.php.

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

249  {
250  $this->tabs_gui->addSubTab("settings_misc",
251  $this->lng->txt("settings"),
252  $this->ctrl->getLinkTarget($this, "edit"));
253 
254  /*$this->tabs_gui->addSubTab("settings_trans",
255  $this->lng->txt("title_and_translations"),
256  $this->ctrl->getLinkTarget($this, "editTranslations"));*/
257 
258  $this->tabs_gui->addSubTab("settings_trans",
259  $this->lng->txt("obj_multilinguality"),
260  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""));
261 
262 
263  $this->tabs_gui->activateTab("settings");
264  $this->tabs_gui->activateSubTab($active_tab);
265  }
+ Here is the caller graph for this function:

◆ setTitleAndDescription()

ilObjRootFolderGUI::setTitleAndDescription ( )

called by prepare output

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

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

227  {
228  global $lng;
229 
230  parent::setTitleAndDescription();
231  $this->tpl->setDescription("");
232  if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"))
233  {
234  if ($this->object->getTitle() == "ILIAS")
235  {
236  $this->tpl->setTitle($lng->txt("repository"));
237  }
238  else
239  {
240  if ($this->object->getDescription() != "")
241  {
242  $this->tpl->setDescription($this->object->getDescription()); // #13479
243  }
244  }
245  }
246  }
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
+ Here is the call graph for this function:

◆ showSortingSettings()

ilObjRootFolderGUI::showSortingSettings ( )
protected

show sorting settings

protected

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

References ilUtil\formRadioButton(), ilObjectGUI\getCreationMode(), ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

542  {
543  $this->tpl->setVariable('TXT_SORTING',$this->lng->txt('sorting_header'));
544  $this->tpl->setVariable('TXT_SORT_TITLE',$this->lng->txt('sorting_title_header'));
545  $this->tpl->setVariable('INFO_SORT_TITLE',$this->lng->txt('sorting_info_title'));
546  $this->tpl->setVariable('TXT_SORT_MANUAL',$this->lng->txt('sorting_manual_header'));
547  $this->tpl->setVariable('INFO_SORT_MANUAL',$this->lng->txt('sorting_info_manual'));
548 
549  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
550  if($this->getCreationMode())
551  {
552  $settings = new ilContainerSortingSettings(0);
553  }
554  else
555  {
556  $settings = new ilContainerSortingSettings($this->object->getId());
557  }
558 
559 
560  $this->tpl->setVariable('RADIO_SORT_TITLE',ilUtil::formRadioButton(
561  $settings->getSortMode() == ilContainer::SORT_TITLE,
562  'sorting',
564  $this->tpl->setVariable('RADIO_SORT_MANUAL',ilUtil::formRadioButton(
565  $settings->getSortMode() == ilContainer::SORT_MANUAL,
566  'sorting',
568  }
static formRadioButton($checked, $varname, $value, $onclick=null, $disabled=false)
??? public
getCreationMode()
get creation mode
+ Here is the call graph for this function:

◆ updateObject()

ilObjRootFolderGUI::updateObject ( )

updates object entry in object_data

public

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

References $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilContainer\_writeContainerSetting(), ilObjectGUI\checkPermissionBool(), initEditForm(), ilUtil\sendSuccess(), setEditTabs(), and ilContainerSortingSettings\setSortMode().

322  {
323  if (!$this->checkPermissionBool("write"))
324  {
325  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
326  }
327  else
328  {
329  $form = $this->initEditForm();
330  if($form->checkInput())
331  {
332  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
333  $settings = new ilContainerSortingSettings($this->object->getId());
334  $settings->setSortMode($form->getInput("sorting"));
335  $settings->update();
336 
337  // save custom icons
338  if ($this->ilias->getSetting("custom_icons"))
339  {
340  if($form->getItemByPostVar("cont_big_icon")->getDeletionFlag())
341  {
342  $this->object->removeBigIcon();
343  }
344  if($form->getItemByPostVar("cont_tiny_icon")->getDeletionFlag())
345  {
346  $this->object->removeTinyIcon();
347  }
348 
349  $this->object->saveIcons($_FILES["cont_big_icon"]['tmp_name'],
350  null, $_FILES["cont_tiny_icon"]['tmp_name']);
351  }
352 
353  // hide icon/title
354  ilContainer::_writeContainerSetting($this->object->getId(),
355  "hide_header_icon_and_title",
356  $form->getInput("hide_header_icon_and_title"));
357 
358  // BEGIN ChangeEvent: Record update
359  global $ilUser;
360  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
361  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
362  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
363  // END ChangeEvent: Record update
364 
365  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
366  $this->ctrl->redirect($this, "edit");
367  }
368 
369  // display form to correct errors
370  $this->setEditTabs();
371  $form->setValuesByPost();
372  $this->tpl->setContent($form->getHTML());
373  }
374  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
_writeContainerSetting($a_id, $a_keyword, $a_value)
setEditTabs($active_tab="settings_misc")
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
+ Here is the call graph for this function:

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