ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ()
 
 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...
 
- 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 ()
 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
 __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...
 
 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 ()
 
 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 ()
 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...
 
 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 ()
 show clipboard 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 (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 type $lng. 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 ()
 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...
 
 setSideColumnReturn ()
 Set return point for side column actions. 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
 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...
 
 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...
 
 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...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. 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...
 
 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
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
- Protected Attributes inherited from ilContainerGUI
 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $app_event_handler
 

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

References ilObjectGUI\$lng.

29  {
30  global $lng;
31 
32  $this->type = "root";
33  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
34 
35  $lng->loadLanguageModule("cntr");
36  $lng->loadLanguageModule("obj");
37  }

Member Function Documentation

◆ _goto()

static ilObjRootFolderGUI::_goto (   $a_target)
static

goto target group

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

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

517  {
518  global $ilAccess, $ilErr, $lng;
519 
521  }
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 479 of file class.ilObjRootFolderGUI.php.

References $_POST, and editTranslationsObject().

480  {
481  if (sizeof($_POST["title"])) {
482  $k = max(array_keys($_POST["title"]))+1;
483  } else {
484  $k = 0;
485  }
486  $_POST["title"][$k] = "";
487  $this->editTranslationsObject(true);
488  }
$_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 493 of file class.ilObjRootFolderGUI.php.

References $_POST, and saveTranslationsObject().

494  {
495  $del_default = true;
496  foreach ($_POST["title"] as $k => $v) {
497  if ($_POST["check"][$k]) {
498  unset($_POST["title"][$k]);
499  unset($_POST["desc"][$k]);
500  unset($_POST["lang"][$k]);
501  if ($_POST["default"] == $k) {
502  $del_default = true;
503  }
504  }
505  }
506  // set new default
507  if ($del_default && sizeof($_POST["title"])) {
508  $_POST["default"] = array_shift(array_keys($_POST["title"]));
509  }
510  $this->saveTranslationsObject();
511  }
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 382 of file class.ilObjRootFolderGUI.php.

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

Referenced by addTranslationObject(), and saveTranslationsObject().

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

◆ executeCommand()

ilObjRootFolderGUI::executeCommand ( )

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

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

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

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

325  {
326  // values are set in initEditForm()
327  }

◆ getTabs()

ilObjRootFolderGUI::getTabs ( )

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

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

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  $this->tabs_gui->addTab(
85  'view_content',
86  $lng->txt("content"),
87  $this->ctrl->getLinkTarget($this, "")
88  );
89  }
90 
91  if ($rbacsystem->checkAccess('write', $this->ref_id)) {
92  $force_active = ($_GET["cmd"] == "edit")
93  ? true
94  : false;
95  $this->tabs_gui->addTarget(
96  "settings",
97  $this->ctrl->getLinkTarget($this, "edit"),
98  "edit",
99  get_class($this),
100  "",
101  $force_active
102  );
103  }
104 
105  // parent tabs (all container: edit_permission, clipboard, trash
106  parent::getTabs();
107  }
$_GET["client_id"]

◆ 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  }
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 60 of file class.ilObjRootFolderGUI.php.

References ilObjCategoryGUI\_importCategories().

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

References ilObjCategoryGUI\_importCategories().

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

References $form, ilContainer\_lookupContainerSetting(), array, ilContainerGUI\initSortingForm(), object, ilCheckboxInputGUI\setChecked(), setEditTabs(), ilContainerGUI\showCustomIconsEditing(), ilContainer\SORT_CREATION, and ilContainer\SORT_TITLE.

Referenced by updateObject().

291  {
292  $this->setEditTabs();
293 
294  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
295  $form = new ilPropertyFormGUI();
296  $form->setFormAction($this->ctrl->getFormAction($this));
297  $form->setTitle($this->lng->txt("repository"));
298 
299 
300  $this->initSortingForm(
301  $form,
302  array(
305  ilcontainer::SORT_MANUAL
306  )
307  );
308 
309 
310  $this->showCustomIconsEditing(1, $form, false);
311 
312 
313  $hide = new ilCheckboxInputGUI($this->lng->txt("cntr_hide_title_and_icon"), "hide_header_icon_and_title");
314  $hide->setChecked(ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"));
315  $form->addItem($hide);
316 
317 
318  $form->addCommandButton("update", $this->lng->txt("save"));
319  $form->addCommandButton("addTranslation", $this->lng->txt("add_translation"));
320 
321  return $form;
322  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setChecked($a_checked)
Set Checked.
setEditTabs($active_tab="settings_misc")
if(isset($_POST['submit'])) $form
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
Create styles array
The data for the language used.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
Create new PHPExcel object
obj_idprivate
static _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 211 of file class.ilObjRootFolderGUI.php.

References $ret, and array.

Referenced by executeCommand(), and viewObject().

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

◆ saveTranslationsObject()

ilObjRootFolderGUI::saveTranslationsObject ( )

Save title and translations.

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

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

Referenced by deleteTranslationsObject().

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

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

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

◆ setTitleAndDescription()

ilObjRootFolderGUI::setTitleAndDescription ( )

called by prepare output

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

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

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

◆ updateObject()

ilObjRootFolderGUI::updateObject ( )

updates object entry in object_data

public

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

References $_POST, $form, $ilSetting, $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilContainer\_writeContainerSetting(), ilObjectGUI\checkPermissionBool(), initEditForm(), object, ilContainerGUI\saveSortingSettings(), ilUtil\sendSuccess(), and setEditTabs().

335  {
336  global $ilSetting;
337 
338  if (!$this->checkPermissionBool("write")) {
339  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
340  } else {
341  $form = $this->initEditForm();
342  if ($form->checkInput()) {
343  $this->saveSortingSettings($form);
344 
345  // save custom icons
346  //save custom icons
347  if ($ilSetting->get("custom_icons")) {
348  if ($_POST["cont_icon_delete"]) {
349  $this->object->removeCustomIcon();
350  }
351  $this->object->saveIcons($_FILES["cont_icon"]['tmp_name']);
352  }
353 
354  // hide icon/title
356  $this->object->getId(),
357  "hide_header_icon_and_title",
358  $form->getInput("hide_header_icon_and_title")
359  );
360 
361  // BEGIN ChangeEvent: Record update
362  global $ilUser;
363  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
364  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
365  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
366  // END ChangeEvent: Record update
367 
368  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
369  $this->ctrl->redirect($this, "edit");
370  }
371 
372  // display form to correct errors
373  $this->setEditTabs();
374  $form->setValuesByPost();
375  $this->tpl->setContent($form->getHTML());
376  }
377  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
setEditTabs($active_tab="settings_misc")
if(isset($_POST['submit'])) $form
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
static _writeContainerSetting($a_id, $a_keyword, $a_value)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$_POST["username"]
+ Here is the call graph for this function:

◆ viewObject()

ilObjRootFolderGUI::viewObject ( )

View root folder.

Returns
bool|void
Exceptions
ilObjectException

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

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

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