ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilContainerGUI Class Reference

Class ilContainerGUI. More...

+ Inheritance diagram for ilContainerGUI:
+ Collaboration diagram for ilContainerGUI:

Public Member Functions

 ilContainerGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access 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 (&$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...
 
 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 ()
 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 ()
 @access public More...
 
 cloneWizardPageListObject ()
 @access 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...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access 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 @access 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...
 
 addToDeskObject ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access public. More...
 

Static Public Member Functions

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...
 

Data Fields

 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- 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
 

Protected Member Functions

 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 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)
 
- 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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...
 
 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)
 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...
 

Private Member Functions

 downloadMultipleObjects ($a_ref_ids)
 

Static Private Member Functions

static recurseFolder ($refid, $title, $tmpdir)
 private functions which iterates through all folders and files and create an according file structure in a temporary directory. More...
 
static copyFile ($obj_id, $title, $tmpdir)
 

Detailed Description

Class ilContainerGUI.

This is a base GUI class for all container objects in ILIAS: root folder, course, group, category, folder

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 19 of file class.ilContainerGUI.php.

Member Function Documentation

◆ __showTimingsButton()

ilContainerGUI::__showTimingsButton ( $tpl)

Definition at line 708 of file class.ilContainerGUI.php.

709 {
710 global $tree;
711
712 if(!$tree->checkForParentType($this->object->getRefId(),'crs'))
713 {
714 return false;
715 }
716 $tpl->setCurrentBlock("custom_button");
717 $tpl->setVariable("ADMIN_MODE_LINK",$this->ctrl->getLinkTargetByClass('ilcoursecontentgui','editTimings'));
718 $tpl->setVariable("TXT_ADMIN_MODE",$this->lng->txt('timings_edit'));
719 $tpl->parseCurrentBlock();
720 return true;
721 }

References ilObjectGUI\$tpl, and ilObjectGUI\$tree.

◆ _buildPath()

static ilContainerGUI::_buildPath (   $a_ref_id,
  $a_course_ref_id 
)
static

build path

Definition at line 3222 of file class.ilContainerGUI.php.

3223 {
3224 global $tree;
3225
3226 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
3227 $counter = 0;
3228 foreach($path_arr as $data)
3229 {
3230 if($counter++)
3231 {
3232 $path .= " > ";
3233 }
3234 $path .= $data['title'];
3235 }
3236
3237 return $path;
3238 }
$path
Definition: index.php:22

References ilObjectGUI\$data, $path, and ilObjectGUI\$tree.

◆ addHeaderRow()

ilContainerGUI::addHeaderRow ( $a_tpl,
  $a_type,
  $a_show_image = true 
)

adds a header row to a block template

Parameters
object$a_tplblock template
string$a_typeobject type @access private

Definition at line 1019 of file class.ilContainerGUI.php.

1020 {
1021 $icon = ilUtil::getImagePath("icon_".$a_type.".svg");
1022 $title = $this->lng->txt("objs_".$a_type);
1023
1024 if ($a_show_image)
1025 {
1026 $a_tpl->setCurrentBlock("container_header_row_image");
1027 $a_tpl->setVariable("HEADER_IMG", $icon);
1028 $a_tpl->setVariable("HEADER_ALT", $title);
1029 }
1030 else
1031 {
1032 $a_tpl->setCurrentBlock("container_header_row");
1033 }
1034
1035 $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
1036 $a_tpl->parseCurrentBlock();
1037 $a_tpl->touchBlock("container_row");
1038 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ addMessageRow()

ilContainerGUI::addMessageRow ( $a_tpl,
  $a_message,
  $a_type 
)

add message row

Definition at line 1110 of file class.ilContainerGUI.php.

1111 {
1112 $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1113 ? "row_type_2"
1114 : "row_type_1";
1115
1116 $a_tpl->touchBlock($this->cur_row_type);
1117
1118 $type = $this->lng->txt("obj_".$a_type);
1119 $a_message = str_replace("[type]", $type, $a_message);
1120
1121 $a_tpl->setVariable("ROW_NBSP", " ");
1122
1123 $a_tpl->setCurrentBlock("container_standard_row");
1124 $a_tpl->setVariable("BLOCK_ROW_CONTENT",
1125 $a_message);
1126 $a_tpl->parseCurrentBlock();
1127 $a_tpl->touchBlock("container_row");
1128 }

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

Add page tabs.

Definition at line 274 of file class.ilContainerGUI.php.

275 {
276 global $ilTabs, $ilCtrl;
277
278 $ilTabs->addTarget("obj_sty",
279 $ilCtrl->getLinkTarget($this, 'editStyleProperties'), "editStyleProperties");
280 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl.

◆ addStandardContainerSubTabs()

ilContainerGUI::addStandardContainerSubTabs (   $a_include_view = true)

Add standar container subtabs for view, manage, oderdering and text/media editor link.

Definition at line 1167 of file class.ilContainerGUI.php.

1168 {
1169 global $ilTabs, $ilAccess, $lng, $ilCtrl, $ilUser, $ilSetting;
1170
1171 if (!is_object($this->object))
1172 {
1173 return;
1174 }
1175
1176 if ($a_include_view && $ilAccess->checkAccess("read", "", $this->object->getRefId()))
1177 {
1178 if (!$this->isActiveAdministrationPanel())
1179 {
1180 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, ""));
1181 }
1182 else
1183 {
1184 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "disableAdministrationPanel"));
1185 }
1186 }
1187
1188 if ( $ilUser->getId() != ANONYMOUS_USER_ID &&
1189 ($this->adminCommands ||
1190 (is_object($this->object) &&
1191 ($ilAccess->checkAccess("write", "", $this->object->getRefId())))
1192 ||
1193 (is_object($this->object) &&
1194 ($this->object->getHiddenFilesFound())) ||
1195 $_SESSION["clipboard"]
1196 )
1197 )
1198 {
1199 if ($this->isActiveAdministrationPanel())
1200 {
1201 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
1202 }
1203 else
1204 {
1205 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, "enableAdministrationPanel"));
1206 }
1207 }
1208 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1209 is_object($this->object) &&
1210 $ilAccess->checkAccess("write", "", $this->object->getRefId()) /* &&
1211 $this->object->getOrderType() == ilContainer::SORT_MANUAL */ // always on because of custom block order
1212 )
1213 {
1214 $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
1215 }
1216 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1217 is_object($this->object) &&
1218 $ilAccess->checkAccess("write", "", $this->object->getRefId())
1219 )
1220 {
1221 if ($ilSetting->get("enable_cat_page_edit"))
1222 {
1223 $ilTabs->addSubTab("page_editor", $lng->txt("cntr_text_media_editor"), $ilCtrl->getLinkTarget($this, "editPageFrame"),
1224 ilFrameTargetInfo::_getFrame("MainContent"));
1225 }
1226 }
1227 }
static _getFrame($a_class, $a_type='')
Get content frame name.
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
global $ilSetting
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15

References $_SESSION, $ilCtrl, $ilSetting, $ilUser, ilObjectGUI\$lng, ilFrameTargetInfo\_getFrame(), and isActiveAdministrationPanel().

Referenced by ilObjCourseGUI\setContentSubTabs(), and setContentSubTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addStandardRow()

ilContainerGUI::addStandardRow ( $a_tpl,
  $a_html,
  $a_item_ref_id = "",
  $a_item_obj_id = "",
  $a_image_type = "" 
)

adds a standard row to a block template

Parameters
object$a_tplblock template
string$a_htmlhtml code @access private

Definition at line 1047 of file class.ilContainerGUI.php.

1049 {
1050 $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1051 ? "row_type_2"
1052 : "row_type_1";
1053
1054 $a_tpl->touchBlock($this->cur_row_type);
1055
1056 $nbsp = true;
1057 if ($this->ilias->getSetting("icon_position_in_lists") == "item_rows")
1058 {
1059 $icon = ilUtil::getImagePath("icon_".$a_image_type.".svg");
1060 $alt = $this->lng->txt("obj_".$a_image_type);
1061
1062 // custom icon
1063 if ($this->ilias->getSetting("custom_icons") &&
1064 in_array($a_image_type, array("cat","grp","crs")))
1065 {
1066 require_once("./Services/Container/classes/class.ilContainer.php");
1067 if (($path = ilContainer::_lookupIconPath($a_item_obj_id, "small")) != "")
1068 {
1069 $icon = $path;
1070 }
1071 }
1072
1073 $a_tpl->setCurrentBlock("block_row_image");
1074 $a_tpl->setVariable("ROW_IMG", $icon);
1075 $a_tpl->setVariable("ROW_ALT", $alt);
1076 $a_tpl->parseCurrentBlock();
1077 $nbsp = false;
1078 }
1079
1080 if ($this->isActiveAdministrationPanel())
1081 {
1082 $a_tpl->setCurrentBlock("block_row_check");
1083 $a_tpl->setVariable("ITEM_ID", $a_item_ref_id);
1084 $a_tpl->parseCurrentBlock();
1085 $nbsp = false;
1086 }
1087 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
1088 if($this->isActiveAdministrationPanel() &&
1090 {
1091 $a_tpl->setCurrentBlock('block_position');
1092 $a_tpl->setVariable('POS_TYPE',$a_image_type);
1093 $a_tpl->setVariable('POS_ID',$a_item_ref_id);
1094 $a_tpl->setVariable('POSITION',sprintf('%.1f',$this->current_position++));
1095 $a_tpl->parseCurrentBlock();
1096 }
1097 if ($nbsp)
1098 {
1099 $a_tpl->setVariable("ROW_NBSP", "&nbsp;");
1100 }
1101 $a_tpl->setCurrentBlock("container_standard_row");
1102 $a_tpl->setVariable("BLOCK_ROW_CONTENT", $a_html);
1103 $a_tpl->parseCurrentBlock();
1104 $a_tpl->touchBlock("container_row");
1105 }
static _lookupSortMode($a_obj_id)
lookup sort mode
_lookupIconPath($a_id, $a_size="big")
lookup icon path
redirection script todo: (a better solution should control the processing via a xml file)

References $path, ilContainer\_lookupIconPath(), ilContainerSortingSettings\_lookupSortMode(), ilUtil\getImagePath(), isActiveAdministrationPanel(), and ilContainer\SORT_MANUAL.

+ Here is the call graph for this function:

◆ addToDeskObject()

ilContainerGUI::addToDeskObject ( )
See also
ilDesktopItemHandling::addToDesk()

Implements ilDesktopItemHandling.

Definition at line 1321 of file class.ilContainerGUI.php.

1322 {
1323 global $ilSetting, $lng;
1324
1325 if((int)$ilSetting->get('disable_my_offers'))
1326 {
1327 return $this->renderObject();
1328 }
1329
1330 include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1332 ilUtil::sendSuccess($lng->txt("added_to_desktop"));
1333 $this->renderObject();
1334 }
renderObject()
render the object
static addToDesktop()
Add desktop item @access public.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $ilSetting, ilObjectGUI\$lng, ilDesktopItemGUI\addToDesktop(), renderObject(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ afterUpdate()

ilContainerGUI::afterUpdate ( )
protected

Post (successful) object update hook.

Reimplemented from ilObjectGUI.

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

105 {
106 // check if template is changed
107 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
109 $this->object->getRefId()
110 );
111 $new_tpl_id = (int) $this->getDidacticTemplateVar('dtpl');
112
113 if($new_tpl_id != $current_tpl_id)
114 {
115 $_REQUEST['tplid'] = $new_tpl_id;
116
117 // redirect to didactic template confirmation
118 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
119 $this->ctrl->setReturn($this,'edit');
120 $this->ctrl->setCmdClass('ildidactictemplategui');
121 $this->ctrl->setCmd('confirmTemplateSwitch');
122 $dtpl_gui = new ilDidacticTemplateGUI($this);
123 return $this->ctrl->forwardCommand($dtpl_gui);
124 }
125 parent::afterUpdate();
126 }
GUI class for didactic template settings inside repository objects.
static lookupTemplateId($a_ref_id)
Lookup template id @global ilDB $ilDB.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

References $_REQUEST, ilObjectGUI\getDidacticTemplateVar(), and ilDidacticTemplateObjSettings\lookupTemplateId().

Referenced by ilObjCategoryGUI\updateObject(), and ilObjCourseGUI\updateObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allowBlocksConfigure()

ilContainerGUI::allowBlocksConfigure ( )

Standard is to allow blocks configuration.

Definition at line 2918 of file class.ilContainerGUI.php.

2919 {
2920 true;
2921 }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

Definition at line 2910 of file class.ilContainerGUI.php.

2911 {
2912 true;
2913 }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

Definition at line 2195 of file class.ilContainerGUI.php.

2196 {
2197 unset($_SESSION['clipboard']);
2198 $GLOBALS['ilCtrl']->returnToParent($this);
2199 }
$GLOBALS['ct_recipient']

References $_SESSION, and $GLOBALS.

◆ cancelPageContentObject()

ilContainerGUI::cancelPageContentObject ( )

Definition at line 915 of file class.ilContainerGUI.php.

916 {
917 $this->ctrl->redirect($this, "");
918 }

◆ clearAdminCommandsDetermination()

ilContainerGUI::clearAdminCommandsDetermination ( )

cleaer administration commands determination

Definition at line 972 of file class.ilContainerGUI.php.

973 {
974 $this->adminCommands = false;
975 }

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

@access public

Definition at line 1776 of file class.ilContainerGUI.php.

1777 {
1778 unset($_SESSION["clipboard"]);
1779 unset($_SESSION["il_rep_clipboard"]);
1780
1781 //var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1782
1783 // only redirect if clipboard was cleared
1784 if (isset($_POST["cmd"]["clear"]))
1785 {
1786 ilUtil::sendSuccess($this->lng->txt("msg_clear_clipboard"),true);
1787
1788 //$this->ctrl->returnToParent($this);
1789 //ilUtil::redirect($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1791 }
1792 }
disableAdministrationPanelObject()
enable administration panel
$_POST['username']
Definition: cron.php:12

References $_POST, $_SESSION, disableAdministrationPanelObject(), and ilUtil\sendSuccess().

Referenced by pasteObject(), and performPasteIntoMultipleObjectsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.

@access public show clipboard

Definition at line 2675 of file class.ilContainerGUI.php.

2676 {
2677 global $ilErr, $ilLog, $ilTabs, $tpl, $ilToolbar, $ilCtrl, $lng;
2678
2679 $ilTabs->activateTab("clipboard");
2680
2681 // function should not be called if clipboard is empty
2682 if (empty($_SESSION['clipboard']) or !is_array($_SESSION['clipboard']))
2683 {
2684 $message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2685 $ilLog->write($message,$ilLog->FATAL);
2686 $ilErr->raiseError($this->lng->txt("permission_denied"),$ilErr->WARNING);
2687 }
2688
2689 $data = array();
2690 foreach($_SESSION["clipboard"]["ref_ids"] as $ref_id)
2691 {
2692 if(!$tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id,false))
2693 {
2694 continue;
2695 }
2696
2697 $data[] = array(
2698 "type" => $tmp_obj->getType(),
2699 "type_txt" => $this->lng->txt("obj_".$tmp_obj->getType()),
2700 "title" => $tmp_obj->getTitle(),
2701 "cmd" => ($_SESSION["clipboard"]["cmd"] == "cut") ? $this->lng->txt("move") :$this->lng->txt($_SESSION["clipboard"]["cmd"]),
2702 "ref_id" => $ref_id,
2703 "obj_id" => $tmp_obj->getId()
2704 );
2705
2706 unset($tmp_obj);
2707 }
2708
2709 include_once("./Services/Object/classes/class.ilObjClipboardTableGUI.php");
2710 $tab = new ilObjClipboardTableGUI($this, "clipboard");
2711 $tab->setData($data);
2712 $tpl->setContent($tab->getHTML());
2713
2714 if (count($data) > 0)
2715 {
2716 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2717 $ilToolbar->addFormButton($lng->txt("insert_object_here"),
2718 "paste");
2719 $ilToolbar->addFormButton($lng->txt("clear_clipboard"),
2720 "clear");
2721 }
2722
2723 return true;
2724 }
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id

References $_SESSION, ilObjectGUI\$data, $ilCtrl, $ilErr, $ilLog, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $tab, ilObjectGUI\$tpl, and ilObjectFactory\getInstanceByRefId().

+ Here is the call graph for this function:

◆ cloneAllObject()

ilContainerGUI::cloneAllObject ( )

Clone all object Overwritten method for copying container objects.

@access public

Reimplemented from ilObjectGUI.

Definition at line 3078 of file class.ilContainerGUI.php.

3079 {
3080 global $ilLog, $ilCtrl;
3081
3082 include_once('./Services/Link/classes/class.ilLink.php');
3083 include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
3084
3085 global $ilAccess,$ilErr,$rbacsystem,$tree,$ilUser;
3086
3087 $new_type = $_REQUEST['new_type'];
3088 $ref_id = (int) $_GET['ref_id'];
3089 $clone_source = (int) $_REQUEST['clone_source'];
3090
3091 if(!$rbacsystem->checkAccess('create', $ref_id,$new_type))
3092 {
3093 $ilErr->raiseError($this->lng->txt('permission_denied'));
3094 }
3095 if(!$clone_source)
3096 {
3097 ilUtil::sendFailure($this->lng->txt('select_one'));
3098 $this->createObject();
3099 return false;
3100 }
3101 if(!$ilAccess->checkAccess('write','', $clone_source,$new_type))
3102 {
3103 $ilErr->raiseError($this->lng->txt('permission_denied'));
3104 }
3105
3106 $options = $_POST['cp_options'] ? $_POST['cp_options'] : array();
3107 $orig = ilObjectFactory::getInstanceByRefId($clone_source);
3108 $result = $orig->cloneAllObject($_COOKIE['PHPSESSID'], $_COOKIE['ilClientId'], $new_type, $ref_id, $clone_source, $options);
3109
3110 // Check if copy is in progress
3111 if ($result == $ref_id)
3112 {
3113 ilUtil::sendInfo($this->lng->txt("object_copy_in_progress"),true);
3114 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
3115 $ilCtrl->redirectByClass("ilrepositorygui", "");
3116 }
3117 else
3118 {
3119 ilUtil::sendSuccess($this->lng->txt("object_duplicated"),true);
3120 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $result);
3121 $ilCtrl->redirectByClass("ilrepositorygui", "");
3122 }
3123 }
$result
$_GET["client_id"]
createObject()
create new object form
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$_COOKIE["ilClientId"]
Definition: cron.php:11
if(!is_array($argv)) $options

References $_COOKIE, $_GET, $_POST, $_REQUEST, $ilCtrl, $ilErr, $ilLog, $ilUser, $options, ilObjectGUI\$ref_id, $result, ilObjectGUI\$tree, ilObjectGUI\createObject(), ilObjectFactory\getInstanceByRefId(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ cloneNodes()

ilContainerGUI::cloneNodes (   $srcRef,
  $dstRef,
$mapping,
  $newName = null 
)

Recursively clones all nodes of the RBAC tree.

@access private

Parameters
integerref_id of source object
integerref_id of destination object
arraymapping new_ref_id => old_ref_id
stringthe new name of the copy (optional).
Returns
The ref_id pointing to the cloned object.

Definition at line 3157 of file class.ilContainerGUI.php.

3158 {
3159 global $tree;
3160 global $ilias;
3161
3162 // clone the source node
3163 $srcObj =& $ilias->obj_factory->getInstanceByRefId($srcRef);
3164 error_log(__METHOD__.' cloning srcRef='.$srcRef.' dstRef='.$dstRef.'...');
3165 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
3166 error_log(__METHOD__.' ...cloning... newRef='.$newRef.'...');
3167
3168 // We must immediately apply a new name to the object, to
3169 // prevent confusion of WebDAV clients about having two objects with identical
3170 // name in the repository.
3171 if (! is_null($newName))
3172 {
3173 $newObj =& $ilias->obj_factory->getInstanceByRefId($newRef);
3174 $newObj->setTitle($newName);
3175 $newObj->update();
3176 unset($newObj);
3177 }
3178 unset($srcObj);
3179 $mapping[$newRef] = $srcRef;
3180
3181 // clone all children of the source node
3182 $children = $tree->getChilds($srcRef);
3183 foreach ($tree->getChilds($srcRef) as $child)
3184 {
3185 // Don't clone role folders, because it does not make sense to clone local roles
3186 // FIXME - Maybe it does make sense (?)
3187 if ($child["type"] != 'rolf')
3188 {
3189 $this->cloneNodes($child["ref_id"],$newRef,$mapping);
3190 }
3191 else
3192 {
3193 if (count($rolf = $tree->getChildsByType($newRef,"rolf")))
3194 {
3195 $mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
3196 }
3197 }
3198 }
3199 error_log(__METHOD__.' ...cloned srcRef='.$srcRef.' dstRef='.$dstRef.' newRef='.$newRef);
3200 return $newRef;
3201 }
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.

References ilObjectGUI\$ilias, ilObjectGUI\$tree, and cloneNodes().

Referenced by cloneNodes(), and performPasteIntoMultipleObjectsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneWizardPageListObject()

ilContainerGUI::cloneWizardPageListObject ( )

@access public

Parameters

Definition at line 2942 of file class.ilContainerGUI.php.

2943 {
2944 $this->cloneWizardPageObject(false);
2945 }
cloneWizardPageObject($a_tree_view=true)
Show clone wizard page for container objects.

References cloneWizardPageObject().

+ Here is the call graph for this function:

◆ cloneWizardPageObject()

ilContainerGUI::cloneWizardPageObject (   $a_tree_view = true)

Show clone wizard page for container objects.

@access public

Definition at line 2953 of file class.ilContainerGUI.php.

2954 {
2955 include_once('Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2956
2957 global $ilObjDataCache,$tree;
2958
2959 if(!$_REQUEST['clone_source'])
2960 {
2961 ilUtil::sendFailure($this->lng->txt('select_one'));
2962 if(isset($_SESSION['wizard_search_title']))
2963 {
2964 $this->searchCloneSourceObject();
2965 }
2966 else
2967 {
2968 $this->createObject();
2969 }
2970 return false;
2971 }
2972 $source_id = $_REQUEST['clone_source'];
2973 $new_type = $_REQUEST['new_type'];
2974 $this->ctrl->setParameter($this,'clone_source',(int) $_REQUEST['clone_source']);
2975 $this->ctrl->setParameter($this,'new_type',$new_type);
2976
2977
2978 // Generell JavaScript
2979 $this->tpl->addJavaScript('./Services/CopyWizard/js/ilContainer.js');
2980 $this->tpl->setVariable('BODY_ATTRIBUTES','onload="ilDisableChilds(\'cmd\');"');
2981
2982
2983 $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.container_wizard_page.html',
2984 "Services/Container");
2985 $this->tpl->setVariable('FORMACTION',$this->ctrl->getFormAction($this));
2986 $this->tpl->setVariable('TYPE_IMG',ilUtil::getImagePath('icon_'.$new_type.'.svg'));
2987 $this->tpl->setVariable('ALT_IMG',$this->lng->txt('obj_'.$new_type));
2988 $this->tpl->setVariable('TXT_DUPLICATE',$this->lng->txt($new_type.'_wizard_page'));
2989 $this->tpl->setVariable('INFO_DUPLICATE',$this->lng->txt($new_type.'_copy_threads_info'));
2990 $this->tpl->setVariable('BTN_COPY',$this->lng->txt('obj_'.$new_type.'_duplicate'));
2991 $this->tpl->setVariable('BTN_BACK',$this->lng->txt('btn_back'));
2992 if(isset($_SESSION['wizard_search_title']))
2993 {
2994 $this->tpl->setVariable('CMD_BACK','searchCloneSource');
2995 }
2996 else
2997 {
2998 $this->tpl->setVariable('CMD_BACK','create');
2999 }
3000
3001 $this->tpl->setVariable('BTN_TREE',$this->lng->txt('treeview'));
3002 $this->tpl->setVariable('BTN_LIST',$this->lng->txt('flatview'));
3003
3004 // Fill item rows
3005 // tree view
3006 if($a_tree_view)
3007 {
3008 $first = true;
3009 $has_items = false;
3010 foreach($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id),true) as $node)
3011 {
3012 if($first == true)
3013 {
3014 $first = false;
3015 continue;
3016 }
3017
3018 if($node['type'] == 'rolf')
3019 {
3020 continue;
3021 }
3022
3023 $has_items = true;
3024
3025 for($i = $source_node['depth'];$i < $node['depth']; $i++)
3026 {
3027 $this->tpl->touchBlock('padding');
3028 $this->tpl->touchBlock('end_padding');
3029 }
3030 // fill options
3031 $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id,$node['type']);
3032 $copy_wizard_page->fillTreeSelection($node['ref_id'],$node['type'],$node['depth']);
3033
3034 $this->tpl->setCurrentBlock('tree_row');
3035 $this->tpl->setVariable('TREE_IMG',ilUtil::getImagePath('icon_'.$node['type'].'.svg'));
3036 $this->tpl->setVariable('TREE_ALT_IMG',$this->lng->txt('obj_'.$node['type']));
3037 $this->tpl->setVariable('TREE_TITLE',$node['title']);
3038 $this->tpl->parseCurrentBlock();
3039 }
3040 if(!$has_items)
3041 {
3042 $this->tpl->setCurrentBlock('no_content');
3043 $this->tpl->setVariable('TXT_NO_CONTENT',$this->lng->txt('container_no_items'));
3044 $this->tpl->parseCurrentBlock();
3045 }
3046 else
3047 {
3048 $this->tpl->setCurrentBlock('tree_footer');
3049 $this->tpl->setVariable('TXT_COPY_ALL',$this->lng->txt('copy_all'));
3050 $this->tpl->setVariable('TXT_LINK_ALL',$this->lng->txt('link_all'));
3051 $this->tpl->setVariable('TXT_OMIT_ALL',$this->lng->txt('omit_all'));
3052 $this->tpl->parseCurrentBlock();
3053
3054 }
3055 }
3056 else
3057 {
3058 foreach($tree->getSubTreeTypes($source_id,array('rolf','crs')) as $type)
3059 {
3060 $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id,$type);
3061 if(strlen($html = $copy_wizard_page->getWizardPageBlockHTML()))
3062 {
3063 $this->tpl->setCurrentBlock('obj_row');
3064 $this->tpl->setVariable('ITEM_BLOCK',$html);
3065 $this->tpl->parseCurrentBlock();
3066 }
3067 }
3068 }
3069 }
static _getInstanceByType($a_source_id, $a_item_type)
Get instance by type.

References $_REQUEST, $_SESSION, ilObjectGUI\$tree, ilCopyWizardPageFactory\_getInstanceByType(), ilObjectGUI\createObject(), ilUtil\getImagePath(), and ilUtil\sendFailure().

Referenced by cloneWizardPageListObject(), and cloneWizardPageTreeObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneWizardPageTreeObject()

ilContainerGUI::cloneWizardPageTreeObject ( )

@access public

Parameters

Definition at line 2930 of file class.ilContainerGUI.php.

2931 {
2932 $this->cloneWizardPageObject(true);
2933 }

References cloneWizardPageObject().

+ Here is the call graph for this function:

◆ confirmRemoveFromSystemObject()

ilContainerGUI::confirmRemoveFromSystemObject ( )

confirmation screen remove from system

Definition at line 3931 of file class.ilContainerGUI.php.

3932 {
3933 global $lng;
3934 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3935
3936 if(!isset($_POST["trash_id"]))
3937 {
3938 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3939 $this->ctrl->redirect($this, "trash");
3940 }
3941
3942 $ru = new ilRepUtilGUI($this);
3943 $ru->confirmRemoveFromSystemObject($_POST["trash_id"]);
3944 }
Repository GUI Utilities.

References $_POST, ilObjectGUI\$lng, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ copyFile()

static ilContainerGUI::copyFile (   $obj_id,
  $title,
  $tmpdir 
)
staticprivate

Definition at line 1684 of file class.ilContainerGUI.php.

1685 {
1686 $newFilename = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1687
1688 // copy to temporary directory
1690 if (!copy($oldFilename, $newFilename))
1691 throw new ilFileException("Could not copy ".$oldFilename." to ".$newFilename);
1692
1693 touch($newFilename, filectime($oldFilename));
1694 }
Class to report exception.
static _lookupAbsolutePath($obj_id, $a_version=null)
return absolute path for version
static getASCIIFilename($a_filename)
convert utf8 to ascii filename

References ilObjectGUI\$obj_id, ilObjFile\_lookupAbsolutePath(), and ilUtil\getASCIIFilename().

Referenced by downloadMultipleObjects(), and recurseFolder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyObject()

ilContainerGUI::copyObject ( )

Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.

@access public

Definition at line 1466 of file class.ilContainerGUI.php.

1467 {
1468 global $rbacsystem, $ilCtrl, $objDefinition;
1469
1470 if ($_GET["item_ref_id"] != "")
1471 {
1472 $_POST["id"] = array($_GET["item_ref_id"]);
1473 }
1474
1475 if (!isset($_POST["id"]))
1476 {
1477 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1478 }
1479
1480 // FOR ALL OBJECTS THAT SHOULD BE COPIED
1481 $containers = 0;
1482 foreach ($_POST["id"] as $ref_id)
1483 {
1484 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1485 $node_data = $this->tree->getNodeData($ref_id);
1486
1487 // count containers
1488 if ($objDefinition->isContainer($node_data["type"]))
1489 {
1490 $containers++;
1491 }
1492
1493 $subtree_nodes = $this->tree->getSubTree($node_data);
1494
1495 $all_node_data[] = $node_data;
1496 $all_subtree_nodes[] = $subtree_nodes;
1497
1498 // CHECK COPY PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1499 foreach ($subtree_nodes as $node)
1500 {
1501 if($node['type'] == 'rolf')
1502 {
1503 continue;
1504 }
1505
1506 if (!$rbacsystem->checkAccess('visible,read,copy',$node["ref_id"]))
1507 {
1508 $no_copy[] = $node["ref_id"];
1509 }
1510 }
1511 }
1512
1513 if ($containers > 0 && count($_POST["id"]) > 1)
1514 {
1515 $this->ilias->raiseError($this->lng->txt("cntr_container_only_on_their_own"), $this->ilias->error_obj->MESSAGE);
1516 }
1517
1518 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1519 if (count($no_copy))
1520 {
1521 $this->ilias->raiseError(
1522 $this->lng->txt("msg_no_perm_copy") . " " . implode(',',$this->getTitlesByRefId($no_copy)),
1523 $this->ilias->error_obj->MESSAGE);
1524 }
1525
1526 // if we have a single container, set it as source id and redirect to ilObjectCopyGUI
1527 if (count($_POST["id"]) == 1)
1528 {
1529 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $_POST["id"][0]);
1530 $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1531 }
1532 else
1533 {
1534 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode($_POST["id"],"_"));
1535 $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1536 }
1537
1538 $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1539 $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1540 $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1541
1542 ilUtil::sendInfo($this->lng->txt("msg_copy_clipboard"), true);
1543
1545 } // END COPY
getTitlesByRefId($a_ref_ids)
get Titles of objects this method is used for error messages in methods cut/copy/paste

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$objDefinition, ilObjectGUI\$ref_id, ilObjectGUI\getTitlesByRefId(), initAndDisplayCopyIntoMultipleObjectsObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ createStyleObject()

ilContainerGUI::createStyleObject ( )

Create Style.

Definition at line 3362 of file class.ilContainerGUI.php.

3363 {
3364 global $ilCtrl;
3365
3366 $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
3367 }

References $ilCtrl.

◆ cutObject()

ilContainerGUI::cutObject ( )

cut object(s) out from a container and write the information to clipboard

@access public

Definition at line 1404 of file class.ilContainerGUI.php.

1405 {
1406 global $rbacsystem, $ilCtrl;
1407
1408 if ($_GET["item_ref_id"] != "")
1409 {
1410 $_POST["id"] = array($_GET["item_ref_id"]);
1411 }
1412
1413 //$this->ilias->raiseError("move operation does not work at the moment and is disabled",$this->ilias->error_obj->MESSAGE);
1414
1415 if (!isset($_POST["id"]))
1416 {
1417 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1418 }
1419
1420 // FOR ALL OBJECTS THAT SHOULD BE COPIED
1421 foreach ($_POST["id"] as $ref_id)
1422 {
1423 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1424 $node_data = $this->tree->getNodeData($ref_id);
1425 $subtree_nodes = $this->tree->getSubTree($node_data);
1426
1427 $all_node_data[] = $node_data;
1428 $all_subtree_nodes[] = $subtree_nodes;
1429
1430 // CHECK DELETE PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1431 foreach ($subtree_nodes as $node)
1432 {
1433 if($node['type'] == 'rolf')
1434 {
1435 continue;
1436 }
1437
1438 if (!$rbacsystem->checkAccess('delete',$node["ref_id"]))
1439 {
1440 $no_cut[] = $node["ref_id"];
1441 }
1442 }
1443 }
1444 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1445 if (count($no_cut))
1446 {
1447 $this->ilias->raiseError($this->lng->txt("msg_no_perm_cut")." ".implode(',',$this->getTitlesByRefId($no_cut)),
1448 $this->ilias->error_obj->MESSAGE);
1449 }
1450 $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1451 $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1452 $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1453
1454 ilUtil::sendInfo($this->lng->txt("msg_cut_clipboard"),true);
1455
1456 return $this->initAndDisplayMoveIntoObjectObject();
1457 } // END CUT

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$ref_id, ilObjectGUI\getTitlesByRefId(), initAndDisplayMoveIntoObjectObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ deleteStyleObject()

ilContainerGUI::deleteStyleObject ( )

Delete Style.

Definition at line 3382 of file class.ilContainerGUI.php.

3383 {
3384 global $ilCtrl;
3385
3386 $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
3387 }

References $ilCtrl.

◆ disableAdministrationPanelObject()

ilContainerGUI::disableAdministrationPanelObject ( )

enable administration panel

Definition at line 1276 of file class.ilContainerGUI.php.

1277 {
1278 $_SESSION["il_cont_admin_panel"] = false;
1279 $this->ctrl->redirect($this, "render");
1280 }

References $_SESSION.

Referenced by clearObject().

+ Here is the caller graph for this function:

◆ downloadMultipleObjects()

ilContainerGUI::downloadMultipleObjects (   $a_ref_ids)
private

Definition at line 1599 of file class.ilContainerGUI.php.

1600 {
1601 global $lng, $rbacsystem, $ilAccess;
1602
1603 include_once "./Services/Utilities/classes/class.ilUtil.php";
1604 include_once 'Modules/Folder/classes/class.ilObjFolder.php';
1605 include_once 'Modules/File/classes/class.ilObjFile.php';
1606 include_once 'Modules/File/classes/class.ilFileException.php';
1607
1608 // create temporary file to download
1609 $zip = PATH_TO_ZIP;
1610 $tmpdir = ilUtil::ilTempnam();
1611 ilUtil::makeDir($tmpdir);
1612
1613 try
1614 {
1615 // copy each selected object
1616 foreach ($a_ref_ids as $ref_id)
1617 {
1618 if (!$ilAccess->checkAccess("read", "", $ref_id))
1619 continue;
1620
1622 continue;
1623
1624 // get object
1625 $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1626 $obj_type = $object->getType();
1627 if ($obj_type == "fold")
1628 {
1629 // copy folder to temp directory
1630 self::recurseFolder($ref_id, $object->getTitle(), $tmpdir);
1631 }
1632 else if ($obj_type == "file")
1633 {
1634 // copy file to temp directory
1635 self::copyFile($object->getId(), $object->getTitle(), $tmpdir);
1636 }
1637 }
1638
1639 // compress the folder
1640 $deliverFilename = ilUtil::getAsciiFilename($this->object->getTitle()) . ".zip";
1641 $tmpzipfile = ilUtil::ilTempnam() . ".zip";
1642 ilUtil::zip($tmpdir, $tmpzipfile, true);
1643 ilUtil::delDir($tmpdir);
1644 ilUtil::deliverFile($tmpzipfile, $deliverFilename, '', false, true, true);
1645 }
1646 catch (ilFileException $e)
1647 {
1648 ilUtil::sendInfo($e->getMessage(), true);
1649 }
1650 }
static copyFile($obj_id, $title, $tmpdir)
static recurseFolder($refid, $title, $tmpdir)
private functions which iterates through all folders and files and create an according file structure...
_isInTrash($a_ref_id)
checks wether object is in trash
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static zip($a_dir, $a_file, $compress_content=false)
static ilTempnam()
Create a temporary file in an ILIAS writable directory.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...

References ilObjectGUI\$lng, ilObjectGUI\$object, ilObjectGUI\$ref_id, ilObject\_isInTrash(), copyFile(), ilUtil\delDir(), ilUtil\deliverFile(), ilUtil\ilTempnam(), ilUtil\makeDir(), recurseFolder(), ilUtil\sendInfo(), and ilUtil\zip().

Referenced by downloadObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ downloadObject()

ilContainerGUI::downloadObject ( )

Definition at line 1547 of file class.ilContainerGUI.php.

1548 {
1549 global $rbacsystem, $ilCtrl;
1550
1551 if ($_GET["item_ref_id"] != "")
1552 {
1553 $_POST["id"] = array($_GET["item_ref_id"]);
1554 }
1555
1556 if (!isset($_POST["id"]))
1557 {
1558 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1559 }
1560
1561 // FOR ALL OBJECTS THAT SHOULD BE DOWNLOADED
1562 foreach ($_POST["id"] as $ref_id)
1563 {
1564 $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1565 $obj_type = $object->getType();
1566 if (!in_array($obj_type, array("fold", "file")))
1567 {
1568 $no_download[] = $object->getType();
1569 }
1570 else if (!$rbacsystem->checkAccess('read', $ref_id))
1571 {
1572 $no_perm[] = $ref_id;
1573 }
1574 }
1575
1576 // IF THERE IS ANY OBJECT THAT CANNOT BE DOWNLOADED
1577 if (count($no_download))
1578 {
1579 $no_download = array_unique($no_download);
1580 foreach ($no_download as $type)
1581 {
1582 $txt_objs[] = $this->lng->txt("objs_".$type);
1583 }
1584 $this->ilias->raiseError(implode(', ',$txt_objs)." ".$this->lng->txt("msg_obj_no_download"),$this->ilias->error_obj->MESSAGE);
1585 }
1586
1587 // NO ACCESS
1588 if (count($no_perm))
1589 {
1590 $this->ilias->raiseError(
1591 $this->lng->txt("msg_obj_perm_download")." ".implode(',',$no_perm),
1592 $this->ilias->error_obj->MESSAGE);
1593 }
1594
1595 // download the objects
1596 $this->downloadMultipleObjects($_POST["id"]);
1597 }
downloadMultipleObjects($a_ref_ids)

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$object, ilObjectGUI\$ref_id, and downloadMultipleObjects().

+ Here is the call graph for this function:

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

Edit order.

Definition at line 1285 of file class.ilContainerGUI.php.

1286 {
1287 global $ilTabs;
1288
1289 $this->edit_order = true;
1290 $_SESSION["il_cont_admin_panel"] = false;
1291 $this->renderObject();
1292
1293 $ilTabs->activateSubTab("ordering");
1294 }

References $_SESSION, and renderObject().

+ Here is the call graph for this function:

◆ editPageContentObject()

ilContainerGUI::editPageContentObject ( )

edit page content (for repository root node and categories)

@access public

Definition at line 820 of file class.ilContainerGUI.php.

821 {
822 global $rbacsystem, $tpl, $lng, $ilCtrl;
823
824 if (!$rbacsystem->checkAccess("write", $this->ref_id))
825 {
826 $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
827 }
828
829 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
830 "xhtml_page");
831 if ($xpage_id > 0)
832 {
833 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
834 $xpage = new ilXHTMLPage($xpage_id);
835 $content = $xpage->getContent();
836 }
837
838 // get template
839 $tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.container_edit_page_content.html",
840 "Services/Container");
841 $tpl->setVariable("VAL_CONTENT", ilUtil::prepareFormOutput($content));
842 $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
843 $tpl->setVariable("TXT_EDIT_PAGE_CONTENT",
844 $this->lng->txt("edit_page_content"));
845 $tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
846 $tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
847 $tpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_old_editor_warning"));
848 $tpl->setVariable("TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt("cntr_old_editor_open_standard_editor"));
849 $tpl->setVariable("IMG_WARNING", ilUtil::getImagePath("icon_alert.svg"));
850 $tpl->setVariable("HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this, "switchToStdEditor"));
851 $tpl->setVariable("ALT_WARNING", $lng->txt("warning"));
852
853 include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
854 include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
855 //$ta = new ilTextAreaInputGUI();
856 //$tags = $ta->getRteTagSet("extended_table_img");
857
858 // add rte support
859 include_once "./Services/RTE/classes/class.ilRTE.php";
860 $rtestring = ilRTE::_getRTEClassname();
861 include_once "./Services/RTE/classes/class.$rtestring.php";
862 $rte = new $rtestring();
863 //$rte->addPlugin("latex");
864 include_once "./Services/Object/classes/class.ilObject.php";
866 $obj_type = ilObject::_lookupType($_GET["ref_id"], TRUE);
867 $rte->addRTESupport($obj_id, $obj_type);
868 //$rte->setStyleSelect(true);
869 //$rte->addCustomRTESupport($obj_id, $obj_type, $tags);
870 }
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
static _lookupObjectId($a_ref_id)
lookup object id
static _lookupType($a_id, $a_reference=false)
lookup object type
static _getRTEClassname()
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
XHTML Page class.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$obj_id, ilObjectGUI\$tpl, ilRTE\_getRTEClassname(), ilContainer\_lookupContainerSetting(), ilObject\_lookupObjectId(), ilObject\_lookupType(), ilUtil\getImagePath(), and ilUtil\prepareFormOutput().

+ Here is the call graph for this function:

◆ editPageFrameObject()

ilContainerGUI::editPageFrameObject ( )

show page editor frameset

Definition at line 785 of file class.ilContainerGUI.php.

786 {
787 include_once("Services/Frameset/classes/class.ilFramesetGUI.php");
788 $fs_gui = new ilFramesetGUI();
789
790 $fs_gui->setFramesetTitle($this->object->getTitle());
791 $fs_gui->setMainFrameName("content");
792 $fs_gui->setSideFrameName("tree");
793
794 // old tiny stuff
795 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
796 "xhtml_page");
797 if ($xpage_id > 0 && $_SESSION["il_cntr_editor"] != "std")
798 {
799 $fs_gui->setMainFrameSource(
800 $this->ctrl->getLinkTarget(
801 $this, "editPageContent"));
802 $fs_gui->setSideFrameSource(
803 $this->ctrl->getLinkTarget($this, "showLinkList"));
804 }
805 else
806 {
807 $this->ctrl->redirectByClass(array("ilcontainerpagegui"), "edit");
808 exit;
809 }
810
811 $fs_gui->show();
812 exit;
813 }
Class ilFramesetGUI.
exit
Definition: login.php:54

References $_SESSION, ilContainer\_lookupContainerSetting(), and exit.

+ Here is the call graph for this function:

◆ editStyleObject()

ilContainerGUI::editStyleObject ( )

Edit Style.

Definition at line 3372 of file class.ilContainerGUI.php.

3373 {
3374 global $ilCtrl;
3375
3376 $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
3377 }

References $ilCtrl.

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

Edit style properties.

Definition at line 3247 of file class.ilContainerGUI.php.

3248 {
3249 global $ilTabs, $tpl;
3250
3251 $this->checkPermission("write");
3252
3253 $this->initStylePropertiesForm();
3254 $tpl->setContent($this->form->getHTML());
3255
3256 $ilTabs->activateTab("obj_sty");
3257 }
initStylePropertiesForm()
Init style properties form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), and initStylePropertiesForm().

+ Here is the call graph for this function:

◆ enableAdministrationPanelObject()

ilContainerGUI::enableAdministrationPanelObject ( )

enable administration panel

Definition at line 1267 of file class.ilContainerGUI.php.

1268 {
1269 $_SESSION["il_cont_admin_panel"] = true;
1270 $this->ctrl->redirect($this, "render");
1271 }

References $_SESSION.

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

Definition at line 1354 of file class.ilContainerGUI.php.

1355 {
1356 $this->multi_download_enabled = true;
1357 $this->renderObject();
1358 }

References renderObject().

+ Here is the call graph for this function:

◆ executeCommand()

& ilContainerGUI::executeCommand ( )

execute command note: this method is overwritten in all container objects

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjFolderGUI, ilObjGroupGUI, ilObjiLincCourseGUI, ilObjOrgUnitGUI, ilObjRootFolderGUI, and ilObjRecoveryFolderGUI.

Definition at line 50 of file class.ilContainerGUI.php.

51 {
52 global $tpl;
53
54 $next_class = $this->ctrl->getNextClass();
55 $cmd = $this->ctrl->getCmd("render");
56
57 switch($next_class)
58 {
59 // page editing
60 case "ilcontainerpagegui":
61 if ($_GET["redirectSource"] != "ilinternallinkgui")
62 {
63 $ret = $this->forwardToPageObject();
64 $tpl->setContent($ret);
65 }
66 else
67 {
68 return "";
69 }
70 break;
71
72 case "ilobjstylesheetgui":
73 $this->forwardToStyleSheet();
74 break;
75
76 default:
77 $this->prepareOutput();
78 $cmd .= "Object";
79 $this->$cmd();
80 break;
81 }
82 return true;
83 }
& forwardToPageObject()
forward command to page object
forwardToStyleSheet()
Forward to style object.
prepareOutput()
prepare output
$cmd
Definition: sahs_server.php:35

References $_GET, $cmd, $ret, ilObjectGUI\$tpl, forwardToPageObject(), forwardToStyleSheet(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ fileManagerLaunchObject()

ilContainerGUI::fileManagerLaunchObject ( )
protected

Launch jnlp.

Definition at line 3612 of file class.ilContainerGUI.php.

3613 {
3614 global $ilUser;
3615
3616 $tpl = new ilTemplate('tpl.fm_launch_ws.html',false,false,'Services/WebServices/FileManager');
3617 $tpl->setVariable('JNLP_URL',ILIAS_HTTP_PATH.'/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
3618 $tpl->setVariable('SESSION_ID', $_COOKIE['PHPSESSID'].'::'.CLIENT_ID);
3619 $tpl->setVariable('UID',$ilUser->getId());
3620 $tpl->setVariable('REF_ID', $this->object->getRefId());
3621 $tpl->setVariable('WSDL_URI', ILIAS_HTTP_PATH.'/webservice/soap/server.php?wsdl');
3622 $tpl->setVariable('LOCAL_FRAME', ilFMSettings::getInstance()->isLocalFSEnabled() ? 1 : 0);
3623 $tpl->setVariable('REST_URI',ILIAS_HTTP_PATH.'/Services/WebServices/Rest/server.php');
3624 $tpl->setVariable('FILE_LOCKS',0);
3625 $tpl->setVariable('UPLOAD_FILESIZE', ilFMSettings::getInstance()->getMaxFileSize());
3626
3627 include_once("./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
3628 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
3629 $tpl->setVariable('HEADER_TITLE',$header_top_title ? $header_top_title : '');
3630 echo $tpl->get();
3631 exit;
3632 }
static getInstance()
Get singleton instance.
special template class to simplify handling of ITX/PEAR

References $_COOKIE, $ilUser, ilObjectGUI\$tpl, exit, and ilFMSettings\getInstance().

+ Here is the call graph for this function:

◆ forwardToPageObject()

& ilContainerGUI::forwardToPageObject ( )

forward command to page object

Definition at line 169 of file class.ilContainerGUI.php.

170 {
171 global $lng, $ilTabs, $ilCtrl;
172
173 $cmd = $ilCtrl->getCmd();
174
175 if (in_array($cmd, array("displayMediaFullscreen", "downloadFile", "displayMedia")))
176 {
177 $this->checkPermission("read");
178 }
179 else
180 {
181 $this->checkPermission("write");
182 }
183
184 $ilTabs->clearTargets();
185
186 if ($_GET["redirectSource"] == "ilinternallinkgui")
187 {
188 exit;
189 }
190
191 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
192 "xhtml_page");
193 if ($xpage_id > 0)
194 {
195 $ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"),
196 $ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
197 }
198 else
199 {
200 $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=".$this->object->getType()."_".
201 $this->object->getRefId(), "_top");
202 }
203
204 // page object
205 include_once("./Services/Container/classes/class.ilContainerPage.php");
206 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
207
208 $lng->loadLanguageModule("content");
209
210 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
211 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
212 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
213 $this->tpl->setCurrentBlock("SyntaxStyle");
214 $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
216 $this->tpl->parseCurrentBlock();
217
218 if (!ilContainerPage::_exists("cont",
219 $this->object->getId()))
220 {
221 // doesn't exist -> create new one
222 $new_page_object = new ilContainerPage();
223 $new_page_object->setParentId($this->object->getId());
224 $new_page_object->setId($this->object->getId());
225 $new_page_object->createFromXML();
226 }
227
228 // get page object
229 $this->ctrl->setReturnByClass("ilcontainerpagegui", "edit");
230 $page_gui = new ilContainerPageGUI($this->object->getId());
231 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
233 $this->object->getStyleSheetId(), $this->object->getType()));
234
235 $page_gui->setTemplateTargetVar("ADM_CONTENT");
236 $page_gui->setLinkXML($link_xml);
237 $page_gui->setFileDownloadLink("");
238 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen"));
239 //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
240 $page_gui->setPresentationTitle("");
241 $page_gui->setTemplateOutput(false);
242
243 // old editor information text
244 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
245 "xhtml_page");
246 if ($xpage_id > 0)
247 {
248 $wtpl = new ilTemplate("tpl.cntr_old_editor_message.html", true,
249 true, "Services/Container");
250 $wtpl->setVariable("ALT_WARNING", $lng->txt("warning"));
251 $wtpl->setVariable("IMG_WARNING",
252 ilUtil::getImagePath("icon_alert.svg"));
253 $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
254 $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
255 $wtpl->setVariable("HREF_SWITCH_TO_NEW_EDITOR",
256 $ilCtrl->getLinkTarget($this, "useNewEditor"));
257 $wtpl->setVariable("TXT_MIGRATION_SWITCH",
258 $lng->txt("cntr_switch_to_new_editor_cmd"));
259 $page_gui->setPrependingHtml($wtpl->get());
260 }
261
262 // style tab
263 $page_gui->setTabHook($this, "addPageTabs");
264
265 $ret = $this->ctrl->forwardCommand($page_gui);
266
267 //$ret =& $page_gui->executeCommand();
268 return $ret;
269 }
Container page GUI class.
Container page object.
getContentStylePath($a_style_id)
get content style path
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
getSyntaxStylePath()
get syntax style path
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.

References $_GET, $cmd, $ilCtrl, ilObjectGUI\$lng, $ret, ilPageObject\_exists(), ilContainer\_lookupContainerSetting(), ilObjectGUI\checkPermission(), exit, ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), ilUtil\getImagePath(), and ilObjStyleSheet\getSyntaxStylePath().

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjFolderGUI\executeCommand(), ilObjGroupGUI\executeCommand(), ilObjRootFolderGUI\executeCommand(), and executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forwardToStyleSheet()

ilContainerGUI::forwardToStyleSheet ( )

Forward to style object.

Definition at line 132 of file class.ilContainerGUI.php.

133 {
134 global $ilCtrl, $ilTabs;
135
136 $ilTabs->clearTargets();
137
138 $cmd = $ilCtrl->getCmd();
139 include_once ("./Services/Style/classes/class.ilObjStyleSheetGUI.php");
140 $this->ctrl->setReturn($this, "editStyleProperties");
141 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
142 $style_gui->omitLocator();
143 if ($cmd == "create" || $_GET["new_type"]=="sty")
144 {
145 $style_gui->setCreationMode(true);
146 }
147
148 if ($cmd == "confirmedDelete")
149 {
150 $this->object->setStyleSheetId(0);
151 $this->object->update();
152 }
153
154 $ret = $this->ctrl->forwardCommand($style_gui);
155
156 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
157 {
158 $style_id = $ret;
159 $this->object->setStyleSheetId($style_id);
160 $this->object->update();
161 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
162 }
163 }
Class ilObjStyleSheetGUI.

References $_GET, $cmd, $ilCtrl, and $ret.

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjFolderGUI\executeCommand(), ilObjGroupGUI\executeCommand(), ilObjRootFolderGUI\executeCommand(), and executeCommand().

+ Here is the caller graph for this function:

◆ getAsynchItemListObject()

ilContainerGUI::getAsynchItemListObject ( )

Get item list command drop down asynchronously.

Definition at line 3411 of file class.ilContainerGUI.php.

3412 {
3413 global $ilCtrl;
3414
3415 $ref_id = $_GET["cmdrefid"];
3418
3419 // this should be done via container-object->getSubItem in the future
3420 $data = array("child" => $ref_id, "ref_id" => $ref_id, "obj_id" => $obj_id,
3421 "type" => $type);
3422 include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
3423 $item_list_gui = ilObjectListGUIFactory::_getListGUIByType($type);
3424 $item_list_gui->setContainerObject($this);
3425
3426 $item_list_gui->enableComments(true);
3427 $item_list_gui->enableNotes(true);
3428 $item_list_gui->enableTags(true);
3429
3430 $this->modifyItemGUI($item_list_gui, $data, false);
3431 $html = $item_list_gui->getListItemHTML($ref_id,
3432 $obj_id, "", "", true, true);
3433
3434 // include plugin slot for async item list
3435 global $ilPluginAdmin;
3436 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
3437 foreach ($pl_names as $pl)
3438 {
3439 $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
3440 $gui_class = $ui_plugin->getUIClassInstance();
3441 $resp = $gui_class->getHTML("Services/Container", "async_item_list", array("html" => $html));
3442 if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
3443 {
3444 $html = $gui_class->modifyHTML($html, $resp);
3445 }
3446 }
3447
3448 echo $html;
3449 exit;
3450 }
const IL_COMP_SERVICE
modifyItemGUI(&$a_item_list_gui, $a_item_data, $a_show_path)
Modify Item ListGUI for presentation in container.
static _lookupObjId($a_id)
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.

References $_GET, ilObjectGUI\$data, $ilCtrl, ilObjectGUI\$obj_id, ilObjectGUI\$ref_id, ilObjectListGUIFactory\_getListGUIByType(), ilObject\_lookupObjId(), ilObject\_lookupType(), exit, ilPluginAdmin\getPluginObject(), IL_COMP_SERVICE, ilUIHookPluginGUI\KEEP, and modifyItemGUI().

+ Here is the call graph for this function:

◆ getContainerPageHTML()

ilContainerGUI::getContainerPageHTML ( )

Get container page HTML.

Definition at line 285 of file class.ilContainerGUI.php.

286 {
287 global $ilSetting, $ilUser;
288
289 if (!$ilSetting->get("enable_cat_page_edit"))
290 {
291 return;
292 }
293
294 // old page editor content
295 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
296 "xhtml_page");
297 if ($xpage_id > 0)
298 {
299 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
300 $xpage = new ilXHTMLPage($xpage_id);
301 return $xpage->getContent();
302 }
303
304
305 // page object
306
307
308 // if page does not exist, return nothing
309 include_once("./Services/COPage/classes/class.ilPageUtil.php");
311 $this->object->getId()))
312 {
313 return "";
314 }
315 include_once("./Services/Container/classes/class.ilContainerPage.php");
316 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
317
318 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
319 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
320 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
321 $this->tpl->setCurrentBlock("SyntaxStyle");
322 $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
324 $this->tpl->parseCurrentBlock();
325
326 // get page object
327 include_once("./Services/Object/classes/class.ilObjectTranslation.php");
328 $ot = ilObjectTranslation::getInstance($this->object->getId());
329 $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
330 $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
331 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
333 $this->object->getStyleSheetId(), $this->object->getType()));
334
335 $page_gui->setPresentationTitle("");
336 $page_gui->setTemplateOutput(false);
337 $page_gui->setHeader("");
338 $ret = $page_gui->showPage();
339
340 //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
341
342 //$ret =& $page_gui->executeCommand();
343 return $ret;
344 }
static getInstance($a_obj_id)
Get instance.
_existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)

References $ilSetting, $ilUser, $lang, $ret, ilPageUtil\_existsAndNotEmpty(), ilContainer\_lookupContainerSetting(), ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), ilObjectTranslation\getInstance(), and ilObjStyleSheet\getSyntaxStylePath().

+ Here is the call graph for this function:

◆ getContentGUI()

ilContainerGUI::getContentGUI ( )

Get content gui object.

Parameters

return

Definition at line 437 of file class.ilContainerGUI.php.

438 {
439 switch ($this->object->getViewMode())
440 {
441 // all items in one block
443 include_once("./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
444 $container_view = new ilContainerSimpleContentGUI($this);
445 break;
446
448 include_once('./Services/Container/classes/class.ilContainerObjectiveGUI.php');
449 $container_view = new ilContainerObjectiveGUI($this);
450 break;
451
452 // all items in one block
454 case IL_CRS_VIEW_TIMING: // not nice this workaround
455 include_once("./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
456 $container_view = new ilContainerSessionsContentGUI($this);
457 break;
458
459 // ILinc courses
461 include_once 'Services/Container/classes/class.ilContainerILincContentGUI.php';
462 $container_view = new ilContainerILincContentGUI($this);
463 break;
464
465 // all items in one block
467 default:
468 include_once("./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
469 $container_view = new ilContainerByTypeContentGUI($this);
470 break;
471 }
472
473 return $container_view;
474 }
const IL_CRS_VIEW_TIMING
Shows all items grouped by type.
GUI class for course objective view.

References IL_CRS_VIEW_TIMING, ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_ILINC, ilContainer\VIEW_OBJECTIVE, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

Referenced by redrawListItemObject(), and renderObject().

+ Here is the caller graph for this function:

◆ getEditFormValues()

ilContainerGUI::getEditFormValues ( )
protected

Get values for edit form.

Returns
array

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, and ilObjRootFolderGUI.

Definition at line 90 of file class.ilContainerGUI.php.

91 {
92 $values = parent::getEditFormValues();
93
94 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
95 $values['didactic_type'] =
96 'dtpl_'.ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
97
98 return $values;
99 }

Referenced by ilObjFolderGUI\editObject().

+ Here is the caller graph for this function:

◆ getTabs()

ilContainerGUI::getTabs ( $tabs_gui)

common tabs for all container objects (should be called at the end of child getTabs() method

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjFolderGUI, ilObjGroupGUI, ilObjiLincCourseGUI, and ilObjRootFolderGUI.

Definition at line 1234 of file class.ilContainerGUI.php.

1235 {
1236 global $rbacsystem, $ilCtrl;
1237
1238 // edit permissions
1239 if ($rbacsystem->checkAccess('edit_permission',$this->ref_id))
1240 {
1241 $tabs_gui->addTarget("perm_settings",
1242 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1243 array("perm","info","owner"), 'ilpermissiongui');
1244 if ($ilCtrl->getNextClass() == "ilpermissiongui")
1245 {
1246 $tabs_gui->activateTab("perm_settings");
1247 }
1248 }
1249
1250 // show clipboard
1251 if (strtolower($_GET["baseClass"]) == "ilrepositorygui" && !empty($_SESSION["clipboard"]))
1252 {
1253 $tabs_gui->addTarget("clipboard",
1254 $this->ctrl->getLinkTarget($this, "clipboard"), "clipboard", get_class($this));
1255 }
1256
1257 }

References $_GET, $_SESSION, and $ilCtrl.

◆ getTreeSelectorGUI()

ilContainerGUI::getTreeSelectorGUI (   $cmd)
protected
Parameters
$cmdstring
Returns
ilTreeExplorerGUI

Reimplemented in ilObjOrgUnitGUI.

Definition at line 3950 of file class.ilContainerGUI.php.

3951 {
3952 include_once("./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
3953 $exp = new ilRepositorySelectorExplorerGUI($this, "showPasteTree");
3954 $exp->setTypeWhiteList(array("root", "cat", "grp", "crs", "fold"));
3955 if ($cmd == "link") {
3956 $exp->setSelectMode("nodes", true);
3957 return $exp;
3958 } else {
3959 $exp->setSelectMode("nodes[]", false);
3960 return $exp;
3961 }
3962 }
Explorer for selecting repository items.

References $cmd.

Referenced by showPasteTreeObject().

+ Here is the caller graph for this function:

◆ ilContainerGUI()

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

Constructor @access public.

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

29 {
30 global $rbacsystem, $lng, $tree;
31
32 $this->rbacsystem =& $rbacsystem;
33
34 $lng->loadLanguageModule("cntr");
35
36 //$this->ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
37
38 // Activate tree cache when rendering the container to improve performance
39 //$tree->useCache(false);
40
41 // prepare output things should generally be made in executeCommand
42 // method (maybe dependent on current class/command
43 $this->ilObjectGUI($a_data, $a_id, $a_call_by_reference, false);
44 }
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.

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

Referenced by ilObjGroupGUI\__construct(), ilObjCategoryGUI\ilObjCategoryGUI(), ilObjCourseGUI\ilObjCourseGUI(), ilObjiLincCourseGUI\ilObjiLincCourseGUI(), and ilObjRootFolderGUI\ilObjRootFolderGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

Definition at line 2211 of file class.ilContainerGUI.php.

2212 {
2213 global $tree;
2214
2215 // empty session on init
2216 $_SESSION['paste_copy_repexpand'] = array();
2217
2218 // copy opend nodes from repository explorer
2219 $_SESSION['paste_copy_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2220
2221 // open current position
2222 $path = $tree->getPathId((int)$_GET['ref_id']);
2223 foreach((array)$path as $node_id)
2224 {
2225 if(!in_array($node_id, $_SESSION['paste_copy_repexpand']))
2226 $_SESSION['paste_copy_repexpand'][] = $node_id;
2227 }
2228
2229 return $this->showPasteTreeObject();
2230 }
showPasteTreeObject()
Show paste tree.

References $_GET, $_SESSION, $path, ilObjectGUI\$tree, and showPasteTreeObject().

Referenced by copyObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

Definition at line 2070 of file class.ilContainerGUI.php.

2071 {
2072 global $tree;
2073
2074 // empty session on init
2075 $_SESSION['paste_linked_repexpand'] = array();
2076
2077 // copy opend nodes from repository explorer
2078 $_SESSION['paste_linked_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2079
2080 // open current position
2081 $path = $tree->getPathId((int)$_GET['ref_id']);
2082 foreach((array)$path as $node_id)
2083 {
2084 if(!in_array($node_id, $_SESSION['paste_linked_repexpand']))
2085 $_SESSION['paste_linked_repexpand'][] = $node_id;
2086 }
2087
2088 return $this->showPasteTreeObject();
2089 }

References $_GET, $_SESSION, $path, ilObjectGUI\$tree, and showPasteTreeObject().

Referenced by linkObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

Definition at line 2280 of file class.ilContainerGUI.php.

2281 {
2282 global $tree;
2283
2284 // empty session on init
2285 $_SESSION['paste_cut_repexpand'] = array();
2286
2287 // copy opend nodes from repository explorer
2288 $_SESSION['paste_cut_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2289
2290 // open current position
2291 $path = $tree->getPathId((int)$_GET['ref_id']);
2292 foreach((array)$path as $node_id)
2293 {
2294 if(!in_array($node_id, $_SESSION['paste_cut_repexpand']))
2295 $_SESSION['paste_cut_repexpand'][] = $node_id;
2296 }
2297
2298 return $this->showPasteTreeObject();
2299 }

References $_GET, $_SESSION, $path, ilObjectGUI\$tree, and showPasteTreeObject().

Referenced by cutObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormPasswordInstruction()

ilContainerGUI::initFormPasswordInstruction ( )
protected

Init password form.

Returns

Definition at line 3483 of file class.ilContainerGUI.php.

3484 {
3485 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3486 $this->form = new ilPropertyFormGUI();
3487 $this->form->setFormAction($this->ctrl->getFormAction($this));
3488
3489 // new password
3490 $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
3491 $ipass->setRequired(true);
3492
3493 $this->form->addItem($ipass);
3494 $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
3495 $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
3496
3497 $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
3498 $this->form->setFormAction($this->ctrl->getFormAction($this));
3499
3500 return $this->form;
3501 }
This class represents a password property in a property form.
This class represents a property form user interface.

Referenced by savePasswordObject(), and showPasswordInstructionObject().

+ Here is the caller graph for this function:

◆ initHeaderAction()

ilContainerGUI::initHeaderAction (   $a_sub_type = null,
  $a_sub_id = null 
)
protected

Add file manager link.

Parameters
<type>$a_sub_type
<type>$a_sub_id

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCourseGUI, and ilObjGroupGUI.

Definition at line 3592 of file class.ilContainerGUI.php.

3593 {
3594 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3595
3596 // begin-patch fm
3597 include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
3598 if(ilFMSettings::getInstance()->isEnabled())
3599 {
3600 if($lg instanceof ilObjectListGUI)
3601 {
3602 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,'fileManagerLaunch'), 'fm_start','_blank');
3603 }
3604 }
3605 // end-patch fm
3606 return $lg;
3607 }
Class ilObjectListGUI.

References ilFMSettings\getInstance().

+ Here is the call graph for this function:

◆ initManualSortingOptionForm()

ilContainerGUI::initManualSortingOptionForm ( ilContainerSortingSettings  $settings,
  $element,
  $a_prefix,
  $a_sorting_settings 
)
protected

Add manual sorting options.

Definition at line 3787 of file class.ilContainerGUI.php.

3789 {
3790 $position = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_position'),$a_prefix.'_new_items_position');
3791 $position->setValue($settings->getSortNewItemsPosition());
3792 $position->setRequired(TRUE);
3793
3794 //new items insert on top
3795 $new_top = new ilRadioOption(
3796 $this->lng->txt('sorting_new_items_at_top'),
3798 );
3799
3800 $position->addOption($new_top);
3801
3802 //new items insert at bottom
3803 $new_bottom = new ilRadioOption(
3804 $this->lng->txt('sorting_new_items_at_bottom'),
3806 );
3807
3808 $position->addOption($new_bottom);
3809
3810 $element->addSubItem($position);
3811
3812 $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'),$a_prefix.'_new_items_order');
3813 $order->setValue($settings->getSortNewItemsOrder());
3814 $order->setRequired(TRUE);
3815
3816 if(in_array(ilContainer::SORT_TITLE, $a_sorting_settings))
3817 {
3818 //new items sort in alphabetical order
3819 $new_title = new ilRadioOption(
3820 $this->lng->txt('sorting_title_header'),
3822 );
3823
3824 $order->addOption($new_title);
3825 }
3826
3827 if(in_array(ilContainer::SORT_CREATION, $a_sorting_settings))
3828 {
3829 //new items sort by creation date
3830 $new_creation = new ilRadioOption(
3831 $this->lng->txt('sorting_creation_header'),
3833 );
3834
3835 $order->addOption($new_creation);
3836 }
3837
3838
3839 if(in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings))
3840 {
3841 //new items by activation
3842 $new_activation = new ilRadioOption(
3843 $this->lng->txt('crs_sort_activation'),
3845 );
3846
3847 $order->addOption($new_activation);
3848 }
3849
3850 $element->addSubItem($order);
3851
3852 $this->initSortingDirectionForm($settings,$element,'manual');
3853
3854 return $element;
3855 }
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
Add sorting direction.
const SORT_NEW_ITEMS_ORDER_ACTIVATION
const SORT_NEW_ITEMS_ORDER_TITLE
const SORT_NEW_ITEMS_ORDER_CREATION
const SORT_NEW_ITEMS_POSITION_BOTTOM
const SORT_NEW_ITEMS_POSITION_TOP
This class represents a property in a property form.
This class represents an option in a radio group.

References ilContainerSortingSettings\getSortNewItemsOrder(), ilContainerSortingSettings\getSortNewItemsPosition(), initSortingDirectionForm(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_NEW_ITEMS_ORDER_ACTIVATION, ilContainer\SORT_NEW_ITEMS_ORDER_CREATION, ilContainer\SORT_NEW_ITEMS_ORDER_TITLE, ilContainer\SORT_NEW_ITEMS_POSITION_BOTTOM, ilContainer\SORT_NEW_ITEMS_POSITION_TOP, and ilContainer\SORT_TITLE.

Referenced by initSortingForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSortingDirectionForm()

ilContainerGUI::initSortingDirectionForm ( ilContainerSortingSettings  $sorting_settings,
  $element,
  $a_prefix 
)
protected

Add sorting direction.

Parameters
ilFormPropertyGUI$element

Definition at line 3758 of file class.ilContainerGUI.php.

3759 {
3760 $direction = new ilRadioGroupInputGUI($this->lng->txt('sorting_direction'),$a_prefix.'_sorting_direction');
3761 $direction->setValue($sorting_settings->getSortDirection());
3762 $direction->setRequired(TRUE);
3763
3764 // asc
3765 $asc = new ilRadioOption(
3766 $this->lng->txt('sorting_asc'),
3768 );
3769 $direction->addOption($asc);
3770
3771 // desc
3772 $desc = new ilRadioOption(
3773 $this->lng->txt('sorting_desc'),
3775 );
3776 $direction->addOption($desc);
3777
3778 $element->addSubItem($direction);
3779
3780 return $element;
3781 }
const SORT_DIRECTION_DESC
const SORT_DIRECTION_ASC

References ilContainerSortingSettings\getSortDirection(), ilContainer\SORT_DIRECTION_ASC, and ilContainer\SORT_DIRECTION_DESC.

Referenced by initManualSortingOptionForm(), and initSortingForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSortingForm()

ilContainerGUI::initSortingForm ( ilPropertyFormGUI  $form,
array  $a_sorting_settings 
)
protected

Append sorting settings to property form.

Parameters
ilPropertyFormGUI$form
type$a_sorting_settings

Definition at line 3691 of file class.ilContainerGUI.php.

3692 {
3693 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3694 include_once './Services/Container/classes/class.ilContainer.php';
3695
3696 $settings = new ilContainerSortingSettings($this->object->getId());
3697 $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
3698
3699 if(in_array(ilContainer::SORT_INHERIT, $a_sorting_settings))
3700 {
3701 $sort_inherit = new ilRadioOption();
3702 $sort_inherit->setTitle(
3703 $this->lng->txt('sort_inherit_prefix').
3704 ' ('.ilContainerSortingSettings::sortModeToString(
3706 $this->object->getId())).') '
3707 );
3708 $sort_inherit->setValue(ilContainer::SORT_INHERIT);
3709 $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
3710 $sort->addOption($sort_inherit);
3711 }
3712 if(in_array(ilContainer::SORT_TITLE,$a_sorting_settings))
3713 {
3714 $sort_title = new ilRadioOption(
3715 $this->lng->txt('sorting_title_header'),
3717 );
3718 $sort_title->setInfo($this->lng->txt('sorting_info_title'));
3719
3720 $this->initSortingDirectionForm($settings,$sort_title,'title');
3721 $sort->addOption($sort_title);
3722 }
3723 if(in_array(ilContainer::SORT_CREATION, $a_sorting_settings))
3724 {
3725 $sort_activation = new ilRadioOption($this->lng->txt('sorting_creation_header'),ilContainer::SORT_CREATION);
3726 $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
3727 $this->initSortingDirectionForm($settings,$sort_activation,'creation');
3728 $sort->addOption($sort_activation);
3729 }
3730 if(in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings))
3731 {
3732 $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'),ilContainer::SORT_ACTIVATION);
3733 $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
3734 $this->initSortingDirectionForm($settings,$sort_activation,'activation');
3735 $sort->addOption($sort_activation);
3736 }
3737 if(in_array(ilContainer::SORT_MANUAL, $a_sorting_settings))
3738 {
3739 $sort_manual = new ilRadioOption(
3740 $this->lng->txt('sorting_manual_header'),
3742 );
3743 $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
3744 $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
3745 $sort->addOption($sort_manual);
3746 }
3747
3748 $sort->setValue($settings->getSortMode());
3749 $form->addItem($sort);
3750
3751 return $form;
3752 }
initManualSortingOptionForm(ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
Add manual sorting options.
static lookupSortModeFromParentContainer($a_obj_id)
Lookup sort mode from parent container.
addItem($a_item)
Add Item (Property, SectionHeader).

References ilPropertyFormGUI\addItem(), initManualSortingOptionForm(), initSortingDirectionForm(), ilContainerSortingSettings\lookupSortModeFromParentContainer(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

Referenced by ilObjFolderGUI\initEditCustomForm(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilObjRootFolderGUI\initEditForm(), and ilObjGroupGUI\initForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initStylePropertiesForm()

ilContainerGUI::initStylePropertiesForm ( )

Init style properties form.

Definition at line 3262 of file class.ilContainerGUI.php.

3263 {
3264 global $ilCtrl, $lng, $ilTabs, $ilSetting, $tpl;
3265
3266 $tpl->setTreeFlatIcon("", "");
3267 $ilTabs->clearTargets();
3268 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
3269 "xhtml_page");
3270 if ($xpage_id > 0)
3271 {
3272 $ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"),
3273 $ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
3274 }
3275 else
3276 {
3277 $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=".$this->object->getType()."_".
3278 $this->object->getRefId(), "_top");
3279 }
3280
3281 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
3282 $page_gui = new ilContainerPageGUI($this->object->getId());
3283 $style_id = $this->object->getStyleSheetId();
3284 if (ilObject::_lookupType($style_id) == "sty")
3285 {
3286 $page_gui->setStyleId($style_id);
3287 }
3288 else
3289 {
3290 $style_id = 0;
3291 }
3292 $page_gui->setTabHook($this, "addPageTabs");
3293 $ilCtrl->getHTML($page_gui);
3294 $ilTabs->setTabActive("obj_sty");
3295
3296 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
3297 $lng->loadLanguageModule("style");
3298
3299 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
3300 $this->form = new ilPropertyFormGUI();
3301
3302 $fixed_style = $ilSetting->get("fixed_content_style_id");
3303// $style_id = $this->object->getStyleSheetId();
3304
3305 if ($fixed_style > 0)
3306 {
3307 $st = new ilNonEditableValueGUI($lng->txt("wiki_current_style"));
3308 $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
3309 $this->lng->txt("global_fixed").")");
3310 $this->form->addItem($st);
3311 }
3312 else
3313 {
3314 $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
3315 $_GET["ref_id"]);
3316
3317 $st_styles[0] = $this->lng->txt("default");
3318 ksort($st_styles);
3319
3320 if ($style_id > 0)
3321 {
3322 // individual style
3323 if (!ilObjStyleSheet::_lookupStandard($style_id))
3324 {
3325 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
3326 $st->setValue(ilObject::_lookupTitle($style_id));
3327 $this->form->addItem($st);
3328
3329//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
3330
3331 // delete command
3332 $this->form->addCommandButton("editStyle",
3333 $lng->txt("style_edit_style"));
3334 $this->form->addCommandButton("deleteStyle",
3335 $lng->txt("style_delete_style"));
3336//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
3337 }
3338 }
3339
3340 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
3341 {
3342 $style_sel = ilUtil::formSelect ($style_id, "style_id",
3343 $st_styles, false, true);
3344 $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
3345 $style_sel->setOptions($st_styles);
3346 $style_sel->setValue($style_id);
3347 $this->form->addItem($style_sel);
3348//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
3349 $this->form->addCommandButton("saveStyleSettings",
3350 $lng->txt("save"));
3351 $this->form->addCommandButton("createStyle",
3352 $lng->txt("sty_create_ind_style"));
3353 }
3354 }
3355 $this->form->setTitle($lng->txt("obj_sty"));
3356 $this->form->setFormAction($ilCtrl->getFormAction($this));
3357 }
This class represents a non editable value in a property form.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
_lookupStandard($a_id)
Lookup standard flag.
static _lookupTitle($a_id)
lookup object title
This class represents a selection list property in a property form.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjStyleSheet\_getStandardStyles(), ilContainer\_lookupContainerSetting(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), ilObject\_lookupType(), and ilUtil\formSelect().

Referenced by editStylePropertiesObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActiveAdministrationPanel()

ilContainerGUI::isActiveAdministrationPanel ( )

Reimplemented in ilObjiLincCourseGUI.

Definition at line 2858 of file class.ilContainerGUI.php.

2859 {
2860 global $ilAccess;
2861
2862 // #10081
2863 if($_SESSION["il_cont_admin_panel"] &&
2864 $this->object->getRefId() &&
2865 !$ilAccess->checkAccess("write", "", $this->object->getRefId()))
2866 {
2867 return false;
2868 }
2869
2870 return $_SESSION["il_cont_admin_panel"];
2871 }

References $_SESSION.

Referenced by addStandardContainerSubTabs(), addStandardRow(), renderObject(), setColumnSettings(), ilObjCourseGUI\setContentSubTabs(), setPageEditorTabs(), and showAdministrationPanel().

+ Here is the caller graph for this function:

◆ isActiveItemOrdering()

ilContainerGUI::isActiveItemOrdering ( )

Check if item ordering is enabled.

Returns
bool

Definition at line 1309 of file class.ilContainerGUI.php.

1310 {
1311 if($this->isActiveOrdering())
1312 {
1313 return (ilContainerSortingSettings::_lookupSortMode($this->object->getId()) == ilContainer::SORT_MANUAL);
1314 }
1315 return false;
1316 }
isActiveOrdering()
Check if ordering is enabled.

References ilContainerSortingSettings\_lookupSortMode(), isActiveOrdering(), and ilContainer\SORT_MANUAL.

+ Here is the call graph for this function:

◆ isActiveOrdering()

ilContainerGUI::isActiveOrdering ( )

Check if ordering is enabled.

Returns
bool

Definition at line 1300 of file class.ilContainerGUI.php.

1301 {
1302 return $this->edit_order ? true : false;
1303 }

Referenced by isActiveItemOrdering(), and showAdministrationPanel().

+ Here is the caller graph for this function:

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

Definition at line 1360 of file class.ilContainerGUI.php.

1361 {
1363 }

References $multi_download_enabled.

Referenced by showAdministrationPanel().

+ Here is the caller graph for this function:

◆ keepObjectsInClipboardObject()

ilContainerGUI::keepObjectsInClipboardObject ( )

Keep objects in the clipboard.

Definition at line 2204 of file class.ilContainerGUI.php.

2205 {
2206 ilUtil::sendSuccess($this->lng->txt("obj_inserted_clipboard"), true);
2207 $GLOBALS['ilCtrl']->returnToParent($this);
2208 }

References $GLOBALS, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ linkObject()

ilContainerGUI::linkObject ( )

create an new reference of an object in tree it's like a hard link of unix

@access public

Definition at line 1702 of file class.ilContainerGUI.php.

1703 {
1704 global $clipboard, $rbacsystem, $rbacadmin, $ilCtrl;
1705
1706 if ($_GET["item_ref_id"] != "")
1707 {
1708 $_POST["id"] = array($_GET["item_ref_id"]);
1709 }
1710
1711 if (!isset($_POST["id"]))
1712 {
1713 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1714 }
1715
1716 // CHECK ACCESS
1717 foreach ($_POST["id"] as $ref_id)
1718 {
1719 if (!$rbacsystem->checkAccess('delete',$ref_id))
1720 {
1721 $no_cut[] = $ref_id;
1722 }
1723
1724 $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1725
1726 if (!$this->objDefinition->allowLink($object->getType()))
1727 {
1728 $no_link[] = $object->getType();
1729 }
1730 }
1731
1732 // NO ACCESS
1733 if (count($no_cut))
1734 {
1735 $this->ilias->raiseError($this->lng->txt("msg_no_perm_link")." ".
1736 implode(',',$no_cut),$this->ilias->error_obj->MESSAGE);
1737 }
1738
1739 if (count($no_link))
1740 {
1741 //#12203
1742 $this->ilias->raiseError($this->lng->txt("msg_obj_no_link"),$this->ilias->error_obj->MESSAGE);
1743
1744 //$this->ilias->raiseError($this->lng->txt("msg_not_possible_link")." ".
1745 // implode(',',$no_link),$this->ilias->error_obj->MESSAGE);
1746 }
1747
1748 // WRITE TO CLIPBOARD
1749 $clipboard["parent"] = $_GET["ref_id"];
1750 $clipboard["cmd"] = $ilCtrl->getCmd();
1751
1752 foreach ($_POST["id"] as $ref_id)
1753 {
1754 $clipboard["ref_ids"][] = $ref_id;
1755 }
1756
1757 $_SESSION["clipboard"] = $clipboard;
1758
1759 $suffix = 'p';
1760 if(count($clipboard["ref_ids"]) == 1)
1761 {
1762 $suffix = 's';
1763 }
1764 ilUtil::sendInfo($this->lng->txt("msg_link_clipboard_" . $suffix),true);
1765
1767
1768 } // END LINK

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$object, ilObjectGUI\$ref_id, initAndDisplayLinkIntoMultipleObjectsObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ lockObject()

ilContainerGUI::lockObject ( )

Definition at line 1366 of file class.ilContainerGUI.php.

1367 {
1368 global $tree, $ilUser, $rbacsystem;
1369
1370 if (!$rbacsystem->checkAccess("write",$_GET['item_ref_id']))
1371 {
1372 $this->ilErr->raiseError($this->lng->txt('err_no_permission'),$this->ilErr->MESSAGE);
1373 }
1374
1375
1376 require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
1378 {
1379 require_once 'Services/WebDAV/classes/class.ilDAVLocks.php';
1380 $locks = new ilDAVLocks();
1381
1382 $result = $locks->lockRef($_GET['item_ref_id'],
1383 $ilUser->getId(), $ilUser->getLogin(),
1384 'ref_'.$_GET['item_ref_id'].'_usr_'.$ilUser->getId(),
1385 time() + /*30*24*60**/60, 0, 'exclusive'
1386 );
1387
1389 $this->lng->txt(
1390 ($result === true) ? 'object_locked' : $result
1391 ),
1392 true);
1393 }
1394 $this->renderObject();
1395 }
static _isActionsVisible()
Static getter.
static _isActive()
Static getter.

References $_GET, $ilUser, $result, ilObjectGUI\$tree, ilDAVServer\_isActionsVisible(), ilDAVServer\_isActive(), renderObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ modifyItemGUI()

ilContainerGUI::modifyItemGUI ( $a_item_list_gui,
  $a_item_data,
  $a_show_path 
)

Modify Item ListGUI for presentation in container.

Definition at line 3207 of file class.ilContainerGUI.php.

3208 {
3209 global $lng;
3210
3211 if($a_show_path)
3212 {
3213 $a_item_list_gui->addCustomProperty($lng->txt('path'),
3214 ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
3215 false, true);
3216 }
3217 }

References ilObjectGUI\$lng.

Referenced by getAsynchItemListObject().

+ Here is the caller graph for this function:

◆ newBlockTemplate()

& ilContainerGUI::newBlockTemplate ( )

determin admin commands

returns a new list block template

@access private

Returns
object block template

Definition at line 1004 of file class.ilContainerGUI.php.

1005 {
1006 $tpl = new ilTemplate("tpl.container_list_block.html", true, true,
1007 "Services/Container");
1008 $this->cur_row_type = "row_type_1";
1009 return $tpl;
1010 }

References ilObjectGUI\$tpl.

◆ pasteObject()

ilContainerGUI::pasteObject ( )

paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved

@access public

Definition at line 2356 of file class.ilContainerGUI.php.

2357 {
2358 global $rbacsystem, $rbacadmin, $rbacreview, $log,$tree;
2359 global $ilUser, $lng, $ilCtrl;
2360
2361 // BEGIN ChangeEvent: Record paste event.
2362 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
2363 // END ChangeEvent: Record paste event.
2364
2365//var_dump($_SESSION["clipboard"]);exit;
2366 if (!in_array($_SESSION["clipboard"]["cmd"],array("cut","link","copy")))
2367 {
2368 $message = get_class($this)."::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2369 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
2370 }
2371
2372 // this loop does all checks
2373 foreach ($_SESSION["clipboard"]["ref_ids"] as $ref_id)
2374 {
2375 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
2376
2377 // CHECK ACCESS
2378 if (!$rbacsystem->checkAccess('create',$this->object->getRefId(), $obj_data->getType()))
2379 {
2380 $no_paste[] = $ref_id;
2381 $no_paste_titles[] = $obj_data->getTitle();
2382 }
2383
2384 // CHECK IF REFERENCE ALREADY EXISTS
2385 if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId()))
2386 {
2387 $exists[] = $ref_id;
2388 break;
2389 }
2390
2391 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
2392 if ($this->tree->isGrandChild($ref_id,$this->object->getRefId()))
2393 {
2395 }
2396
2397 if ($ref_id == $this->object->getRefId())
2398 {
2400 }
2401
2402 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
2403 $obj_type = $obj_data->getType();
2404
2405 if (!in_array($obj_type, array_keys($this->objDefinition->getSubObjects($this->object->getType()))))
2406 {
2407 $not_allowed_subobject[] = $obj_data->getType();
2408 }
2409 }
2410
2412 // process checking results
2413 // BEGIN WebDAV: Copying an object into the same container is allowed
2414 if (count($exists) && $_SESSION["clipboard"]["cmd"] != "copy")
2415 // END WebDAV: Copying an object into the same container is allowed
2416 {
2417 $this->ilias->raiseError($this->lng->txt("msg_obj_exists"),$this->ilias->error_obj->MESSAGE);
2418 }
2419
2420 if (count($is_child))
2421 {
2422 $this->ilias->raiseError($this->lng->txt("msg_not_in_itself")." ".implode(',',$is_child),
2423 $this->ilias->error_obj->MESSAGE);
2424 }
2425
2426 if (count($not_allowed_subobject))
2427 {
2428 $this->ilias->raiseError($this->lng->txt("msg_may_not_contain")." ".implode(',',$not_allowed_subobject),
2429 $this->ilias->error_obj->MESSAGE);
2430 }
2431
2432 if (count($no_paste))
2433 {
2434 $this->ilias->raiseError($this->lng->txt("msg_no_perm_paste")." ".
2435 implode(',',$no_paste),$this->ilias->error_obj->MESSAGE);
2436 }
2437
2438 // log pasteObject call
2439 $log->write("ilObjectGUI::pasteObject(), cmd: ".$_SESSION["clipboard"]["cmd"]);
2440
2442 // everything ok: now paste the objects to new location
2443
2444 // to prevent multiple actions via back/reload button
2445 $ref_ids = $_SESSION["clipboard"]["ref_ids"];
2446 unset($_SESSION["clipboard"]["ref_ids"]);
2447
2448 // BEGIN WebDAV: Support a copy command in the repository
2449 // process COPY command
2450 if ($_SESSION["clipboard"]["cmd"] == "copy")
2451 {
2452 unset($_SESSION["clipboard"]["cmd"]);
2453
2454 // new implementation, redirects to ilObjectCopyGUI
2455 if (count($ref_ids) == 1)
2456 {
2457 $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2458 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $ref_ids[0]);
2459 $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2460 }
2461 else
2462 {
2463 $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2464 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode($ref_ids, "_"));
2465 $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2466 }
2467
2468
2469
2470 /* old implementation
2471
2472 foreach($ref_ids as $ref_id)
2473 {
2474 $revIdMapping = array();
2475
2476 $oldNode_data = $tree->getNodeData($ref_id);
2477 if ($oldNode_data['parent'] == $this->object->getRefId())
2478 {
2479 require_once 'Modules/File/classes/class.ilObjFileAccess.php';
2480 $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'],null);
2481 $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, $newTitle);
2482 }
2483 else
2484 {
2485 $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, null);
2486 }
2487
2488 // BEGIN ChangeEvent: Record copy event.
2489 $old_parent_data = $tree->getParentNodeData($ref_id);
2490 $newNode_data = $tree->getNodeData($newRef);
2491 ilChangeEvent::_recordReadEvent($oldNode_data['type'], $ref_id,
2492 $oldNode_data['obj_id'], $ilUser->getId());
2493 ilChangeEvent::_recordWriteEvent($newNode_data['obj_id'], $ilUser->getId(), 'add',
2494 $this->object->getId());
2495 ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
2496 // END ChangeEvent: Record copy event.
2497 }*/
2498
2499 $log->write("ilObjectGUI::pasteObject(), copy finished");
2500 }
2501 // END WebDAV: Support a Copy command in the repository
2502
2503 // process CUT command
2504 if ($_SESSION["clipboard"]["cmd"] == "cut")
2505 {
2506
2507 foreach($ref_ids as $ref_id)
2508 {
2509 // Store old parent
2510 $old_parent = $tree->getParentId($ref_id);
2511 $this->tree->moveTree($ref_id,$this->object->getRefId());
2512 $rbacadmin->adjustMovedObjectPermissions($ref_id,$old_parent);
2513
2514 include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
2516
2517 // BEGIN ChangeEvent: Record cut event.
2518 $node_data = $tree->getNodeData($ref_id);
2519 $old_parent_data = $tree->getNodeData($old_parent);
2520 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'remove',
2521 $old_parent_data['obj_id']);
2522 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2523 $this->object->getId());
2524 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2525 // END PATCH ChangeEvent: Record cut event.
2526 }
2527 } // END CUT
2528
2529 // process LINK command
2530 if ($_SESSION["clipboard"]["cmd"] == "link")
2531 {
2532 foreach ($ref_ids as $ref_id)
2533 {
2534 // get node data
2535 $top_node = $this->tree->getNodeData($ref_id);
2536
2537 // get subnodes of top nodes
2538 $subnodes[$ref_id] = $this->tree->getSubtree($top_node);
2539 }
2540
2541 // now move all subtrees to new location
2542 foreach ($subnodes as $key => $subnode)
2543 {
2544 // first paste top_node....
2545 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($key);
2546 $new_ref_id = $obj_data->createReference();
2547 $obj_data->putInTree($_GET["ref_id"]);
2548 $obj_data->setPermissions($_GET["ref_id"]);
2549
2550 // BEGIN ChangeEvent: Record link event.
2551 $node_data = $tree->getNodeData($new_ref_id);
2552 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2553 $this->object->getId());
2554 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2555 // END PATCH ChangeEvent: Record link event.
2556 }
2557
2558 $log->write("ilObjectGUI::pasteObject(), link finished");
2559
2560 // inform other objects in hierarchy about link operation
2561 //$this->object->notify("link",$this->object->getRefId(),$_SESSION["clipboard"]["parent_non_rbac_id"],$this->object->getRefId(),$subnodes);
2562 } // END LINK
2563
2564 // save cmd for correct message output after clearing the clipboard
2565 $last_cmd = $_SESSION["clipboard"]["cmd"];
2566
2567
2568 // clear clipboard
2569 $this->clearObject();
2570
2571 if ($last_cmd == "cut")
2572 {
2573 ilUtil::sendSuccess($this->lng->txt("msg_cut_copied"),true);
2574 }
2575 // BEGIN WebDAV: Support a copy command in repository
2576 else if ($last_cmd == "copy")
2577 {
2578 ilUtil::sendSuccess($this->lng->txt("msg_cloned"),true);
2579 }
2580 else if ($last_cmd == 'link')
2581 // END WebDAV: Support copy command in repository
2582 {
2583 ilUtil::sendSuccess($this->lng->txt("msg_linked"),true);
2584 }
2585
2586 $this->ctrl->returnToParent($this);
2587
2588 } // END PASTE
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _adjustMovedObjectConditions($a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
clearObject()
clear clipboard and go back to last object

References $_GET, $_SESSION, $ilCtrl, $ilUser, ilObjectGUI\$lng, $log, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilConditionHandler\_adjustMovedObjectConditions(), ilChangeEvent\_catchupWriteEvents(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChangeEvent\_recordWriteEvent(), clearObject(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ performPasteIntoMultipleObjectsObject()

ilContainerGUI::performPasteIntoMultipleObjectsObject ( )

Definition at line 1794 of file class.ilContainerGUI.php.

1795 {
1796 global $rbacsystem, $rbacadmin, $rbacreview, $log, $tree, $ilObjDataCache, $ilUser;
1797
1798 $command = $_SESSION['clipboard']['cmd'];
1799 if(!in_array($command, array('cut', 'link', 'copy')))
1800 {
1801 $message = __METHOD__.": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1802 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
1803 }
1804
1805 if($command == 'cut')
1806 {
1807 if(isset($_POST['node']) && (int)$_POST['node'])
1808 $_POST['nodes'] = array($_POST['node']);
1809 }
1810
1811 if(!is_array($_POST['nodes']) || !count($_POST['nodes']))
1812 {
1813 ilUtil::sendFailure($this->lng->txt('select_at_least_one_object'));
1814 switch ($command)
1815 {
1816 case 'cut':
1817 $this->showPasteTreeObject();
1818 break;
1819 case 'copy':
1820 $this->showPasteTreeObject();
1821 break;
1822 case 'link':
1823 $this->showPasteTreeObject();
1824 break;
1825 }
1826 return;
1827 }
1828
1829 // this loop does all checks
1830 $folder_objects_cache = array();
1831 foreach($_SESSION['clipboard']['ref_ids'] as $ref_id)
1832 {
1834 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1835
1836 foreach($_POST['nodes'] as $folder_ref_id)
1837 {
1838 if(!array_key_exists($folder_ref_id, $folder_objects_cache))
1839 {
1840 $folder_objects_cache[$folder_ref_id] = ilObjectFactory::getInstanceByRefId($folder_ref_id);
1841 }
1842
1843 // CHECK ACCESS
1844 if(!$rbacsystem->checkAccess('create', $folder_ref_id, $obj_data->getType()))
1845 {
1846 $no_paste[] = sprintf($this->lng->txt('msg_no_perm_paste_object_in_folder'), $obj_data->getTitle().' ['.$obj_data->getRefId().']', $folder_objects_cache[$folder_ref_id]->getTitle().' ['.$folder_objects_cache[$folder_ref_id]->getRefId().']');
1847 }
1848
1849 // CHECK IF REFERENCE ALREADY EXISTS
1850 if($folder_ref_id == $current_parent_id)
1851 {
1852 $exists[] = sprintf($this->lng->txt('msg_obj_exists_in_folder'), $obj_data->getTitle().' ['.$obj_data->getRefId().']', $folder_objects_cache[$folder_ref_id]->getTitle().' ['.$folder_objects_cache[$folder_ref_id]->getRefId().']');
1853 }
1854
1855 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
1856 if ($tree->isGrandChild($ref_id, $folder_ref_id) ||
1857 $ref_id == $folder_ref_id)
1858 {
1859 $is_child[] = sprintf($this->lng->txt('msg_paste_object_not_in_itself'), $obj_data->getTitle().' ['.$obj_data->getRefId().']');
1860 }
1861
1862 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
1863 if(!in_array($obj_data->getType(), array_keys($this->objDefinition->getSubObjects($folder_objects_cache[$folder_ref_id]->getType()))))
1864 {
1865 $not_allowed_subobject[] = sprintf($this->lng->txt('msg_obj_may_not_contain_objects_of_type'), $folder_objects_cache[$folder_ref_id]->getTitle().' ['.$folder_objects_cache[$folder_ref_id]->getRefId().']',
1866 $GLOBALS['lng']->txt('obj_'.$obj_data->getType()));
1867 }
1868 }
1869 }
1870
1872 // process checking results
1873 if(count($exists) && $command != "copy")
1874 {
1875 $error .= implode('<br />', $exists);
1876 }
1877
1878 if(count($is_child))
1879 {
1880 $error .= $error != '' ? '<br />' : '';
1881 $error .= implode('<br />', $is_child);
1882 }
1883
1884 if(count($not_allowed_subobject))
1885 {
1886 $error .= $error != '' ? '<br />' : '';
1887 $error .= implode('<br />', $not_allowed_subobject);
1888 }
1889
1890 if(count($no_paste))
1891 {
1892 $error .= $error != '' ? '<br />' : '';
1893 $error .= implode('<br />', $no_paste);
1894 }
1895
1896 if($error != '')
1897 {
1898 ilUtil::sendFailure($error);
1899 switch ($command)
1900 {
1901 case 'cut':
1902 $this->showPasteTreeObject();
1903 break;
1904 case 'copy':
1905 $this->showPasteTreeObject();
1906 break;
1907 case 'link':
1908 $this->showPasteTreeObject();
1909 break;
1910 }
1911 return;
1912 }
1913
1914 // log pasteObject call
1915 $log->write(__METHOD__.", cmd: ".$command);
1916
1918 // everything ok: now paste the objects to new location
1919
1920 // to prevent multiple actions via back/reload button
1921 $ref_ids = $_SESSION['clipboard']['ref_ids'];
1922 unset($_SESSION['clipboard']['ref_ids']);
1923
1924 // BEGIN ChangeEvent: Record paste event.
1925 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
1926 // END ChangeEvent: Record paste event.
1927
1928 // process COPY command
1929 if($command == 'copy')
1930 {
1931 foreach($_POST['nodes'] as $folder_ref_id)
1932 {
1933 foreach($ref_ids as $ref_id)
1934 {
1935 $revIdMapping = array();
1936
1937 $oldNode_data = $tree->getNodeData($ref_id);
1938 if ($oldNode_data['parent'] == $folder_ref_id)
1939 {
1940 require_once 'Modules/File/classes/class.ilObjFileAccess.php';
1941 $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'],null);
1942 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1943 }
1944 else
1945 {
1946 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, null);
1947 }
1948
1949 // BEGIN ChangeEvent: Record copy event.
1950 $old_parent_data = $tree->getParentNodeData($ref_id);
1951 $newNode_data = $tree->getNodeData($newRef);
1952 ilChangeEvent::_recordReadEvent($oldNode_data['type'], $ref_id,
1953 $oldNode_data['obj_id'], $ilUser->getId());
1954 ilChangeEvent::_recordWriteEvent($newNode_data['obj_id'], $ilUser->getId(), 'add',
1955 $ilObjDataCache->lookupObjId($folder_ref_id));
1956 ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
1957 // END PATCH ChangeEvent: Record cut event.
1958 }
1959 }
1960
1961 ilUtil::sendSuccess($this->lng->txt('msg_cloned'), true);
1962 } // END COPY
1963
1964 // process CUT command
1965 if($command == 'cut')
1966 {
1967 foreach($_POST['nodes'] as $folder_ref_id)
1968 {
1969 foreach($ref_ids as $ref_id)
1970 {
1971 // Store old parent
1972 $old_parent = $tree->getParentId($ref_id);
1973 $tree->moveTree($ref_id, $folder_ref_id);
1974 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
1975
1976 include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
1978
1979 // BEGIN ChangeEvent: Record cut event.
1980 $node_data = $tree->getNodeData($ref_id);
1981 $old_parent_data = $tree->getNodeData($old_parent);
1982 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'remove',
1983 $old_parent_data['obj_id']);
1984 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
1985 $ilObjDataCache->lookupObjId($folder_ref_id));
1986 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
1987 // END PATCH ChangeEvent: Record cut event.
1988 }
1989
1990 // prevent multiple iterations for cut cmommand
1991 break;
1992 }
1993
1994 ilUtil::sendSuccess($this->lng->txt('msg_cut_copied'), true);
1995 } // END CUT
1996
1997 // process LINK command
1998 if($command == 'link')
1999 {
2000 $linked_to_folders = array();
2001
2002 include_once "Services/AccessControl/classes/class.ilRbacLog.php";
2003 $rbac_log_active = ilRbacLog::isActive();
2004
2005 foreach($_POST['nodes'] as $folder_ref_id)
2006 {
2007 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
2008
2009 foreach($ref_ids as $ref_id)
2010 {
2011 // get node data
2012 $top_node = $tree->getNodeData($ref_id);
2013
2014 // get subnodes of top nodes
2015 $subnodes[$ref_id] = $tree->getSubtree($top_node);
2016 }
2017
2018 // now move all subtrees to new location
2019 foreach($subnodes as $key => $subnode)
2020 {
2021 // first paste top_node....
2022 $obj_data = ilObjectFactory::getInstanceByRefId($key);
2023 $new_ref_id = $obj_data->createReference();
2024 $obj_data->putInTree($folder_ref_id);
2025 $obj_data->setPermissions($folder_ref_id);
2026
2027 // rbac log
2028 if($rbac_log_active)
2029 {
2030 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
2031 $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
2032 ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, $key);
2033 }
2034
2035 // BEGIN ChangeEvent: Record link event.
2036 $node_data = $tree->getNodeData($new_ref_id);
2037 ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2038 $ilObjDataCache->lookupObjId($folder_ref_id));
2039 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2040 // END PATCH ChangeEvent: Record link event.
2041 }
2042
2043 $log->write(__METHOD__.', link finished');
2044 }
2045
2046 $linked_targets = array();
2047 if(count($linked_to_folders))
2048 {
2049 require_once 'Services/Link/classes/class.ilLink.php';
2050 foreach($linked_to_folders as $ref_id => $title)
2051 {
2052 $linked_targets[] = '<a href="' . ilLink::_getLink($ref_id) . '">' . $title . '</a>';
2053 }
2054 }
2055
2056 $suffix = 'p';
2057 if(count($ref_ids) == 1)
2058 {
2059 $suffix = 's';
2060 }
2061 ilUtil::sendSuccess(sprintf($this->lng->txt('mgs_objects_linked_to_the_following_folders_' . $suffix), implode(', ', $linked_targets)), true);
2062 } // END LINK
2063
2064 // clear clipboard
2065 $this->clearObject();
2066
2067 $this->ctrl->returnToParent($this);
2068 }
_recordReadEvent($a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static _appendNumberOfCopyToFilename($a_file_name, $nth_copy=null, $a_handle_extension=false)
Appends the text " - Copy" to a filename in the language of the current user.
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
const LINK_OBJECT
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
static isActive()

References $_POST, $_SESSION, $GLOBALS, $ilUser, $log, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilConditionHandler\_adjustMovedObjectConditions(), ilObjFileAccess\_appendNumberOfCopyToFilename(), ilChangeEvent\_catchupWriteEvents(), ilLink\_getLink(), ilChangeEvent\_recordReadEvent(), ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), clearObject(), cloneNodes(), ilRbacLog\gatherFaPa(), ilObjectFactory\getInstanceByRefId(), ilRbacLog\isActive(), ilRbacLog\LINK_OBJECT, ilUtil\sendFailure(), ilUtil\sendSuccess(), and showPasteTreeObject().

Referenced by ilObjOrgUnitGUI\executeCommand(), and ilObjOrgUnitGUI\performPaste().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutput()

ilContainerGUI::prepareOutput (   $a_show_subobjects = true)

prepare output

Definition at line 349 of file class.ilContainerGUI.php.

350 {
351 if (parent::prepareOutput()) // return false in admin mode
352 {
353 if ($this->getCreationMode() != true && $a_show_subobjects)
354 {
355 // This method is called directly from ilContainerGUI::renderObject
356 #$this->showPossibleSubObjects();
357 $this->showTreeFlatIcon();
358
359 // Member view
360 include_once './Services/Container/classes/class.ilMemberViewGUI.php';
361 ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
362 }
363 }
364 }
static showMemberViewSwitch($a_ref_id)
Show member view switch.
getCreationMode()
get creation mode

References ilObjectGUI\getCreationMode(), ilMemberViewGUI\showMemberViewSwitch(), and showTreeFlatIcon().

+ Here is the call graph for this function:

◆ recurseFolder()

static ilContainerGUI::recurseFolder (   $refid,
  $title,
  $tmpdir 
)
staticprivate

private functions which iterates through all folders and files and create an according file structure in a temporary directory.

This function works recursive.

Parameters
integer$refidreference it
tmpdictory$tmpdir
Returns
returns first created directory

Definition at line 1660 of file class.ilContainerGUI.php.

1661 {
1662 global $rbacsystem, $tree, $ilAccess;
1663
1664 $tmpdir = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1665 ilUtil::makeDir($tmpdir);
1666
1667 $subtree = $tree->getChildsByTypeFilter($refid, array("fold","file"));
1668
1669 foreach ($subtree as $child)
1670 {
1671 if (!$ilAccess->checkAccess("read", "", $child["ref_id"]))
1672 continue;
1673
1674 if (ilObject::_isInTrash($child["ref_id"]))
1675 continue;
1676
1677 if ($child["type"] == "fold")
1678 self::recurseFolder($child["ref_id"], $child["title"], $tmpdir);
1679 else
1680 self::copyFile($child["obj_id"], $child["title"], $tmpdir);
1681 }
1682 }

References ilObjectGUI\$tree, ilObject\_isInTrash(), copyFile(), ilUtil\getASCIIFilename(), ilUtil\makeDir(), and recurseFolder().

Referenced by downloadMultipleObjects(), and recurseFolder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redrawListItemObject()

ilContainerGUI::redrawListItemObject ( )

Redraw a list item (ajax)

Parameters

return

Definition at line 3529 of file class.ilContainerGUI.php.

3530 {
3531 global $tpl;
3532
3533 $html = null;
3534
3535 $item_data = $this->object->getSubItems(false, false, (int) $_GET["child_ref_id"]);
3536 $container_view = $this->getContentGUI();
3537
3538 // list item is session material (not part of "_all"-items - see below)
3539 include_once './Modules/Session/classes/class.ilEventItems.php';
3540 $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
3541 if(in_array((int)$_GET["child_ref_id"], $event_items))
3542 {
3543 include_once('./Services/Object/classes/class.ilObjectActivation.php');
3544 foreach ($this->object->items["sess"] as $id)
3545 {
3546 $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
3547 foreach($items as $event_item)
3548 {
3549 if ($event_item["child"] == (int)$_GET["child_ref_id"])
3550 {
3551 // sessions
3552 if((int)$_GET["parent_ref_id"])
3553 {
3554 $event_item["parent"] = (int)$_GET["parent_ref_id"];
3555 }
3556 $html = $container_view->renderItem($event_item);
3557 }
3558 }
3559 }
3560 }
3561
3562 // "normal" list item
3563 if(!$html)
3564 {
3565 foreach ($this->object->items["_all"] as $id)
3566 {
3567 if ($id["child"] == (int) $_GET["child_ref_id"])
3568 {
3569 $html = $container_view->renderItem($id);
3570 }
3571 }
3572 }
3573
3574 if($html)
3575 {
3576 echo $html;
3577
3578 // we need to add onload code manually (rating, comments, etc.)
3579 echo $tpl->getOnLoadCodeForAsynch();
3580 }
3581
3582 exit;
3583 }
getContentGUI()
Get content gui object.
_getItemsOfContainer($a_ref_id)
static getItemsByEvent($a_event_id)
Get session material / event items.

References $_GET, ilObjectGUI\$tpl, ilEventItems\_getItemsOfContainer(), exit, getContentGUI(), and ilObjectActivation\getItemsByEvent().

+ Here is the call graph for this function:

◆ removeFromDeskObject()

ilContainerGUI::removeFromDeskObject ( )
See also
ilDesktopItemHandling::removeFromDesk()

Implements ilDesktopItemHandling.

Definition at line 1339 of file class.ilContainerGUI.php.

1340 {
1341 global $ilSetting, $lng;
1342
1343 if((int)$ilSetting->get('disable_my_offers'))
1344 {
1345 return $this->renderObject();
1346 }
1347
1348 include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1350 ilUtil::sendSuccess($lng->txt("removed_from_desktop"));
1351 $this->renderObject();
1352 }
static removeFromDesktop()
Remove item from personal desktop @access public.

References $ilSetting, ilObjectGUI\$lng, ilDesktopItemGUI\removeFromDesktop(), renderObject(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ removeFromSystemObject()

ilContainerGUI::removeFromSystemObject ( )

remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method

@access public

Reimplemented in ilObjRecoveryFolderGUI.

Definition at line 3907 of file class.ilContainerGUI.php.

3908 {
3909 global $log, $ilAppEventHandler, $lng;
3910
3911 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3912 $ru = new ilRepUtilGUI($this);
3913 $ru->removeObjectsFromSystem($_POST["trash_id"]);
3914 $this->ctrl->redirect($this, "trash");
3915 }

References $_POST, ilObjectGUI\$lng, and $log.

◆ renderObject()

ilContainerGUI::renderObject ( )

render the object

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjFolderGUI, ilObjGroupGUI, and ilObjRootFolderGUI.

Definition at line 481 of file class.ilContainerGUI.php.

482 {
483 global $ilDB, $tpl, $ilTabs, $ilCtrl, $ilSetting;
484
485 $container_view = $this->getContentGUI();
486
487 $this->setContentSubTabs();
488 if ($this->isActiveAdministrationPanel())
489 {
490 $ilTabs->activateSubTab("manage");
491 }
492 else
493 {
494 $ilTabs->activateSubTab("view_content");
495 }
496
497 $container_view->setOutput();
498
499 $this->adminCommands = $container_view->adminCommands;
500
501 // it is important not to show the subobjects/admin panel here, since
502 // we will create nested forms in case, e.g. a news/calendar item is added
503 if ($ilCtrl->getNextClass() != "ilcolumngui")
504 {
505 $this->showAdministrationPanel($tpl);
506 $this->showPossibleSubObjects();
507 }
508
509 $this->showPermanentLink($tpl);
510
511 // add tree updater javascript
512 if ((int) $_GET["ref_id"] > 1 && $ilSetting->get("rep_tree_synchronize"))
513 {
514 $ilCtrl->setParameter($this, "active_node", (int) $_GET["ref_id"]);
515 /*$tpl->addOnloadCode("
516 if (parent && parent.tree && parent.tree.updater)
517 {
518 parent.tree.updater('tree_div', '".
519 $ilCtrl->getLinkTarget($this, "showTree", "", true, false)
520 ."');
521 }");*/
522 }
523 }
showAdministrationPanel(&$tpl)
show administration panel
setContentSubTabs()
Set content sub tabs.
showPermanentLink(&$tpl)
show permanent link
showPossibleSubObjects()
show possible sub objects selection list
global $ilDB

References $_GET, $ilCtrl, $ilDB, $ilSetting, ilObjectGUI\$tpl, getContentGUI(), isActiveAdministrationPanel(), setContentSubTabs(), showAdministrationPanel(), showPermanentLink(), and showPossibleSubObjects().

Referenced by addToDeskObject(), editOrderObject(), enableMultiDownloadObject(), lockObject(), removeFromDeskObject(), and ilObjiLincCourseGUI\viewObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetRowType()

ilContainerGUI::resetRowType ( )

Definition at line 1130 of file class.ilContainerGUI.php.

1131 {
1132 $this->cur_row_type = "";
1133 }

◆ savePageContentObject()

ilContainerGUI::savePageContentObject ( )

Definition at line 872 of file class.ilContainerGUI.php.

873 {
874 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
875 include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
876 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
877 "xhtml_page");
878
879 /*include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
880 include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
881 $ta = new ilTextAreaInputGUI();
882 $ta->setRteTagSet("extended_table_img");
883 $tags = $ta->getRteTagString();*/
884
885 //$text = ilUtil::stripSlashes($_POST["page_content"],
886 // true,
887 // $tags);
888
889 $text = ilUtil::stripSlashes($_POST["page_content"],
890 true,
892 if ($xpage_id > 0)
893 {
894 $xpage = new ilXHTMLPage($xpage_id);
895 $xpage->setContent($text);
896 $xpage->save();
897 }
898 else
899 {
900 $xpage = new ilXHTMLPage();
901 $xpage->setContent($text);
902 $xpage->save();
903 ilContainer::_writeContainerSetting($this->object->getId(),
904 "xhtml_page", $xpage->getId());
905 }
906
907 include_once("Services/RTE/classes/class.ilRTE.php");
908 ilRTE::_cleanupMediaObjectUsage($text, $this->object->getType().":html",
909 $this->object->getId());
910
911 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
912 $this->ctrl->redirect($this, "");
913 }
_writeContainerSetting($a_id, $a_keyword, $a_value)
& _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
_cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)
synchronises appearances of media objects in $a_text with media object usage table
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, ilRTE\_cleanupMediaObjectUsage(), ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), ilContainer\_lookupContainerSetting(), ilContainer\_writeContainerSetting(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ savePasswordObject()

ilContainerGUI::savePasswordObject ( )
protected

Save password.

Returns

Definition at line 3507 of file class.ilContainerGUI.php.

3508 {
3509 global $ilUser;
3510
3511 $form = $this->initFormPasswordInstruction();
3512 if($form->checkInput())
3513 {
3514 $ilUser->resetPassword($this->form->getInput('new_password'),$this->form->getInput('new_password'));
3515 ilUtil::sendSuccess($this->lng->txt('webdav_pwd_instruction_success'),true);
3516 $this->showPasswordInstructionObject(false);
3517 return true;
3518 }
3519 $form->setValuesByPost();
3521 }
initFormPasswordInstruction()
Init password form.
showPasswordInstructionObject($a_init=true)
Show webdav password instruction.

References $ilUser, initFormPasswordInstruction(), ilUtil\sendSuccess(), and showPasswordInstructionObject().

+ Here is the call graph for this function:

◆ saveSortingObject()

ilContainerGUI::saveSortingObject ( )

Save Sorting.

@access public

Parameters

Reimplemented in ilObjCourseGUI.

Definition at line 3133 of file class.ilContainerGUI.php.

3134 {
3135 include_once('Services/Container/classes/class.ilContainerSorting.php');
3136 $sorting = ilContainerSorting::_getInstance($this->object->getId());
3137
3138 // Allow comma
3139 $positions = str_replace(',','.',$_POST['position']);
3140
3141 $sorting->savePost($positions);
3142 ilUtil::sendSuccess($this->lng->txt('cntr_saved_sorting'), true);
3143 $this->ctrl->redirect($this, "editOrder");
3144 }
static _getInstance($a_obj_id)
get instance by obj_id

References $_POST, ilContainerSorting\_getInstance(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveSortingSettings()

ilContainerGUI::saveSortingSettings ( ilPropertyFormGUI  $form)
protected

Save sorting settings.

Parameters
ilPropertyFormGUI$form

Definition at line 3861 of file class.ilContainerGUI.php.

3862 {
3863 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3864 $settings = new ilContainerSortingSettings($this->object->getId());
3865 $settings->setSortMode($form->getInput("sorting"));
3866
3867 switch($form->getInput('sorting'))
3868 {
3870 $settings->setSortDirection($form->getInput('title_sorting_direction'));
3871 break;
3873 $settings->setSortDirection($form->getInput('activation_sorting_direction'));
3874 break;
3876 $settings->setSortDirection($form->getInput('creation_sorting_direction'));
3877 break;
3879 $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
3880 $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
3881 $settings->setSortDirection($form->getInput('manual_sorting_direction'));
3882 break;
3883 }
3884
3885 $settings->update();
3886 }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

References ilPropertyFormGUI\getInput(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

Referenced by ilObjFolderGUI\updateCustom(), ilObjCategoryGUI\updateObject(), ilObjCourseGUI\updateObject(), ilObjGroupGUI\updateObject(), and ilObjRootFolderGUI\updateObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveStyleSettingsObject()

ilContainerGUI::saveStyleSettingsObject ( )

Save style settings.

Definition at line 3392 of file class.ilContainerGUI.php.

3393 {
3394 global $ilSetting;
3395
3396 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
3397 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
3398 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
3399 || $this->object->getStyleSheetId() == 0))
3400 {
3401 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
3402 $this->object->update();
3403 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
3404 }
3405 $this->ctrl->redirect($this, "editStyleProperties");
3406 }

References $_POST, $ilSetting, ilObjStyleSheet\_lookupStandard(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setColumnSettings()

ilContainerGUI::setColumnSettings (   $column_gui)

May be overwritten in subclasses.

Reimplemented from ilObjectGUI.

Definition at line 2876 of file class.ilContainerGUI.php.

2877 {
2878 global $ilAccess;
2879 parent::setColumnSettings($column_gui);
2880
2881 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
2882 $this->isActiveAdministrationPanel() &&
2883 $this->allowBlocksMoving())
2884 {
2885 $column_gui->setEnableMovement(true);
2886 }
2887
2888 $column_gui->setRepositoryItems(
2889 $this->object->getSubItems($this->isActiveAdministrationPanel(), true));
2890
2891 //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
2892 // && $this->allowBlocksConfigure())
2893 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
2894 {
2895 $column_gui->setBlockProperty("news", "settings", true);
2896 //$column_gui->setBlockProperty("news", "public_notifications_option", true);
2897 $column_gui->setBlockProperty("news", "default_visibility_option", true);
2898 $column_gui->setBlockProperty("news", "hide_news_block_option", true);
2899 }
2900
2901 if ($this->isActiveAdministrationPanel())
2902 {
2903 $column_gui->setAdminCommands(true);
2904 }
2905 }

References isActiveAdministrationPanel().

+ Here is the call graph for this function:

◆ setContentSubTabs()

ilContainerGUI::setContentSubTabs ( )

Set content sub tabs.

Reimplemented in ilObjCourseGUI.

Definition at line 528 of file class.ilContainerGUI.php.

529 {
531 }
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.

References addStandardContainerSubTabs().

Referenced by renderObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPageEditorTabs()

ilContainerGUI::setPageEditorTabs ( )

Add page editor tabs.

Definition at line 1139 of file class.ilContainerGUI.php.

1140 {
1141 global $lng;
1142
1143 if (!$this->isActiveAdministrationPanel()
1144 || strtolower($this->ctrl->getCmdClass()) != "ilcontainerpagegui")
1145 {
1146 return;
1147 }
1148
1149 $lng->loadLanguageModule("content");
1150 //$tabs_gui = new ilTabsGUI();
1151 //$tabs_gui->setSubTabs();
1152
1153 // back to upper context
1154 $this->tabs_gui->setBackTarget($this->lng->txt("obj_cat"),
1155 $this->ctrl->getLinkTarget($this, "frameset"),
1156 ilFrameTargetInfo::_getFrame("MainContent"));
1157
1158 $this->tabs_gui->addTarget("edit", $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "view")
1159 , array("", "view"), "ilcontainerpagegui");
1160
1161 //$this->tpl->setTabs($tabs_gui->getHTML());
1162 }

References ilObjectGUI\$lng, ilFrameTargetInfo\_getFrame(), and isActiveAdministrationPanel().

+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjOrgUnitGUI, and ilObjRootFolderGUI.

Definition at line 392 of file class.ilContainerGUI.php.

393 {
394 global $ilias;
395
396 if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"))
397 {
398 $this->tpl->setTitle($this->object->getTitle());
399 $this->tpl->setDescription($this->object->getLongDescription());
400
401 // set tile icon
402 $icon = ilObject::_getIcon($this->object->getId(), "big", $this->object->getType());
403 if ($ilias->getSetting("custom_icons") &&
404 in_array($this->object->getType(), array("cat","grp","crs", "root")))
405 {
406 require_once("./Services/Container/classes/class.ilContainer.php");
407 if (($path = ilContainer::_lookupIconPath($this->object->getId(), "big")) != "")
408 {
409 $icon = $path;
410 }
411 }
412 $this->tpl->setTitleIcon($icon, $this->lng->txt("obj_".$this->object->getType()));
413
414 include_once './Services/Object/classes/class.ilObjectListGUIFactory.php';
415 $lgui = ilObjectListGUIFactory::_getListGUIByType($this->object->getType());
416 $lgui->initItem($this->object->getRefId(), $this->object->getId());
417 $this->tpl->setAlertProperties($lgui->getAlertProperties());
418 }
419 }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.

References ilObjectGUI\$ilias, $path, ilObject\_getIcon(), ilObjectListGUIFactory\_getListGUIByType(), ilContainer\_lookupContainerSetting(), and ilContainer\_lookupIconPath().

+ Here is the call graph for this function:

◆ showAdministrationPanel()

ilContainerGUI::showAdministrationPanel ( $tpl)

show administration panel

Definition at line 536 of file class.ilContainerGUI.php.

537 {
538 global $ilAccess, $lng;
539
540 $lng->loadLanguageModule('cntr');
541
542 if ($this->isActiveAdministrationPanel())
543 {
544 // #11545
545 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
546
547 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
548 $toolbar = new ilToolbarGUI();
549 $this->ctrl->setParameter($this, "type", "");
550 $this->ctrl->setParameter($this, "item_ref_id", "");
551
552 if (!$_SESSION["clipboard"])
553 {
554 if ($this->object->gotItems())
555 {
556 $toolbar->setLeadingImage(
557 ilUtil::getImagePath("arrow_upright.svg"),
558 $lng->txt("actions")
559 );
560 $toolbar->addFormButton(
561 $this->lng->txt('delete_selected_items'),
562 'delete'
563 );
564 $toolbar->addFormButton(
565 $this->lng->txt('move_selected_items'),
566 'cut'
567 );
568 $toolbar->addFormButton(
569 $this->lng->txt('copy_selected_items'),
570 'copy'
571 );
572 $toolbar->addFormButton(
573 $this->lng->txt('link_selected_items'),
574 'link'
575 );
576 // add download button if multi download enabled
577 $folder_set = new ilSetting("fold");
578 if ($folder_set->get("enable_multi_download") == true)
579 {
580 $toolbar->addSeparator();
581 $toolbar->addFormButton(
582 $this->lng->txt('download_selected_items'),
583 'download'
584 );
585 }
586 }
587 if($this->object->getType() == 'crs')
588 {
589 if($this->object->gotItems())
590 {
591 $toolbar->addSeparator();
592 }
593
594 $toolbar->addButton(
595 $this->lng->txt('cntr_adopt_content'),
596 $this->ctrl->getLinkTargetByClass(
597 'ilObjectCopyGUI',
598 'initSourceSelection')
599 );
600 }
601 }
602 else
603 {
604 //$GLOBALS["tpl"]->addAdminPanelCommand("paste",
605 // $this->lng->txt("paste_clipboard_items"));
606
607 $toolbar->addFormButton(
608 $this->lng->txt('paste_clipboard_items'),
609 'paste'
610 );
611
612 if($_SESSION["clipboard"]["cmd"] == "link")
613 {
614 //$GLOBALS["tpl"]->addAdminPanelCommand("initAndDisplayLinkIntoMultipleObjects",
615 // $this->lng->txt("paste_clipboard_items_into_multiple_objects"));
616 /*$toolbar->addFormButton(
617 $this->lng->txt('paste_clipboard_items_into_multiple_objects'),
618 'initAndDisplayLinkIntoMultipleObjects'
619 );*/
620 }
621
622 $toolbar->addFormButton(
623 $this->lng->txt('clear_clipboard'),
624 'clear'
625 );
626
627 if ($this->isMultiDownloadEnabled())
628 {
629 $toolbar->addSeparator();
630 $toolbar->addFormButton(
631 $this->lng->txt('download_selected_items'),
632 'download'
633 );
634 }
635 }
636
637 $GLOBALS['tpl']->addAdminPanelToolbar(
638 $toolbar,
639 ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false,
640 ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false
641 );
642
643 // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
644 if ($this->object->gotItems())
645 {
646 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
647 }
648 }
649 else
650 {
651 if ($this->edit_order)
652 {
653 if($this->object->gotItems() and $ilAccess->checkAccess("write", "", $this->object->getRefId()))
654 {
655 include_once('./Services/Container/classes/class.ilContainer.php');
656
657 if ($this->isActiveOrdering())
658 {
659 // #11843
660 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
661
662 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
663 $toolbar = new ilToolbarGUI();
664 $this->ctrl->setParameter($this, "type", "");
665 $this->ctrl->setParameter($this, "item_ref_id", "");
666
667 $toolbar->addFormButton(
668 $this->lng->txt('sorting_save'),
669 'saveSorting'
670 );
671
672 $GLOBALS['tpl']->addAdminPanelToolbar($toolbar, true, false);
673
674 /*
675 $GLOBALS["tpl"]->addAdminPanelCommand("saveSorting",
676 $this->lng->txt('sorting_save'));
677
678 // button should appear at bottom, too
679 $GLOBALS["tpl"]->admin_panel_bottom = true;
680 */
681 }
682 }
683 }
684 else if ($this->isMultiDownloadEnabled())
685 {
686 // #11843
687 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
688
689 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
690 $toolbar = new ilToolbarGUI();
691 $this->ctrl->setParameter($this, "type", "");
692 $this->ctrl->setParameter($this, "item_ref_id", "");
693
694 $toolbar->addFormButton(
695 $this->lng->txt('download_selected_items'),
696 'download'
697 );
698
699 $GLOBALS['tpl']->addAdminPanelToolbar(
700 $toolbar,
701 $this->object->gotItems() ? true : false,
702 $this->object->gotItems() ? true : false
703 );
704 }
705 }
706 }
ILIAS Setting Class.

References $_SESSION, $GLOBALS, ilObjectGUI\$lng, ilUtil\getImagePath(), isActiveAdministrationPanel(), isActiveOrdering(), and isMultiDownloadEnabled().

Referenced by renderObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showCustomIconsEditing()

ilContainerGUI::showCustomIconsEditing (   $a_input_colspan = 1,
ilPropertyFormGUI  $a_form = null,
  $a_as_section = true 
)

show edit section of custom icons for container

Definition at line 2731 of file class.ilContainerGUI.php.

2732 {
2733 if ($this->ilias->getSetting("custom_icons"))
2734 {
2735 if(!$a_form)
2736 {
2737 /*
2738 $this->tpl->addBlockFile("CONTAINER_ICONS", "container_icon_settings",
2739 "tpl.container_icon_settings.html", "Services/Container");
2740
2741 if (($big_icon = $this->object->getBigIconPath()) != "")
2742 {
2743 $this->tpl->setCurrentBlock("big_icon");
2744 $this->tpl->setVariable("SRC_BIG_ICON", $big_icon);
2745 $this->tpl->parseCurrentBlock();
2746 }
2747 if ($this->object->getType() != "root")
2748 {
2749 if (($small_icon = $this->object->getSmallIconPath()) != "")
2750 {
2751 $this->tpl->setCurrentBlock("small_icon");
2752 $this->tpl->setVariable("SRC_SMALL_ICON", $small_icon);
2753 $this->tpl->parseCurrentBlock();
2754 }
2755 $this->tpl->setCurrentBlock("small_icon_row");
2756 $this->tpl->setVariable("SMALL_ICON", $this->lng->txt("standard_icon"));
2757 $this->tpl->setVariable("SMALL_SIZE", "(".
2758 $this->ilias->getSetting("custom_icon_small_width")."x".
2759 $this->ilias->getSetting("custom_icon_small_height").")");
2760 $this->tpl->setVariable("TXT_REMOVE_S", $this->lng->txt("remove"));
2761 $this->tpl->parseCurrentBlock();
2762 }
2763 if (($tiny_icon = $this->object->getTinyIconPath()) != "")
2764 {
2765 $this->tpl->setCurrentBlock("tiny_icon");
2766 $this->tpl->setVariable("SRC_TINY_ICON", $tiny_icon);
2767 $this->tpl->parseCurrentBlock();
2768 }
2769 $this->tpl->setCurrentBlock("container_icon_settings");
2770 $this->tpl->setVariable("SPAN_TITLE", $a_input_colspan + 1);
2771 $this->tpl->setVariable("SPAN_INPUT", $a_input_colspan);
2772 $this->tpl->setVariable("ICON_SETTINGS", $this->lng->txt("icon_settings"));
2773 $this->tpl->setVariable("BIG_ICON", $this->lng->txt("big_icon"));
2774 $this->tpl->setVariable("TINY_ICON", $this->lng->txt("tiny_icon"));
2775 $this->tpl->setVariable("BIG_SIZE", "(".
2776 $this->ilias->getSetting("custom_icon_big_width")."x".
2777 $this->ilias->getSetting("custom_icon_big_height").")");
2778 $this->tpl->setVariable("TINY_SIZE", "(".
2779 $this->ilias->getSetting("custom_icon_tiny_width")."x".
2780 $this->ilias->getSetting("custom_icon_tiny_height").")");
2781 $this->tpl->setVariable("TXT_REMOVE", $this->lng->txt("remove"));
2782 $this->tpl->parseCurrentBlock();
2783 */
2784 }
2785 else
2786 {
2787 //$big_icon = $this->object->getBigIconPath();
2788 $custom_icon = $this->object->getCustomIconPath();
2789 //$tiny_icon = $this->object->getTinyIconPath();
2790
2791 if($a_as_section)
2792 {
2793 $title = new ilFormSectionHeaderGUI();
2794 $title->setTitle($this->lng->txt("icon_settings"));
2795 }
2796 else
2797 {
2798 $title = new ilCustomInputGUI($this->lng->txt("icon_settings"), "");
2799 }
2800 $a_form->addItem($title);
2801
2802 // big
2803 /*
2804 $caption = $this->lng->txt("big_icon")." (".
2805 $this->ilias->getSetting("custom_icon_big_width")."x".
2806 $this->ilias->getSetting("custom_icon_big_height").")";
2807 $icon = new ilImageFileInputGUI($caption, "cont_big_icon");
2808 $icon->setImage($big_icon);
2809 if($a_as_section)
2810 {
2811 $a_form->addItem($icon);
2812 }
2813 else
2814 {
2815 $title->addSubItem($icon);
2816 }*/
2817
2818 // small/standard
2819 //if ($this->object->getType() != "root")
2820 //{
2821 /*$caption = $this->lng->txt("standard_icon")." (".
2822 $this->ilias->getSetting("custom_icon_small_width")."x".
2823 $this->ilias->getSetting("custom_icon_small_height").")";*/
2824 $caption = $this->lng->txt("cont_custom_icon");
2825 $icon = new ilImageFileInputGUI($caption, "cont_icon");
2826 $icon->setSuffixes(array("svg"));
2827 $icon->setImage($custom_icon);
2828 if($a_as_section)
2829 {
2830 $a_form->addItem($icon);
2831 }
2832 else
2833 {
2834 $title->addSubItem($icon);
2835 }
2836 //}
2837
2838 // tiny
2839 /*
2840 $caption = $this->lng->txt("tiny_icon")." (".
2841 $this->ilias->getSetting("custom_icon_tiny_width")."x".
2842 $this->ilias->getSetting("custom_icon_tiny_height").")";
2843 $icon = new ilImageFileInputGUI($caption, "cont_tiny_icon");
2844 $icon->setImage($tiny_icon);
2845 if($a_as_section)
2846 {
2847 $a_form->addItem($icon);
2848 }
2849 else
2850 {
2851 $title->addSubItem($icon);
2852 }
2853 */
2854 }
2855 }
2856 }
This class represents a custom property in a property form.
This class represents a section header in a property form.
This class represents an image file property in a property form.

Referenced by ilObjCourseGUI\initCourseIconsForm(), ilObjRootFolderGUI\initEditForm(), ilObjGroupGUI\initGroupIconsForm(), ilObjCategoryGUI\initIconsForm(), and ilObjFolderGUI\initIconsForm().

+ Here is the caller graph for this function:

◆ showLinkListObject()

ilContainerGUI::showLinkListObject ( )

Definition at line 920 of file class.ilContainerGUI.php.

921 {
922 global $lng, $tree;
923
924 $tpl = new ilTemplate("tpl.container_link_help.html", true, true,
925 "Services/Container");
926
927 $type_ordering = array(
928 "cat", "fold", "crs", "icrs", "icla", "grp", "chat", "frm", "lres",
929 "glo", "webr", "file", "exc",
930 "tst", "svy", "mep", "qpl", "spl");
931
932 $childs = $tree->getChilds($_GET["ref_id"]);
933 foreach($childs as $child)
934 {
935 if (in_array($child["type"], array("lm", "dbk", "sahs", "htlm")))
936 {
937 $cnt["lres"]++;
938 }
939 else
940 {
941 $cnt[$child["type"]]++;
942 }
943 }
944
945 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
946 $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
947 foreach($type_ordering as $type)
948 {
949 $tpl->setCurrentBlock("row");
950 $tpl->setVariable("ROWCOL", "tblrow".((($i++)%2)+1));
951 if ($type != "lres")
952 {
953 $tpl->setVariable("TYPE", $lng->txt("objs_".$type).
954 " (".((int)$cnt[$type]).")");
955 }
956 else
957 {
958 $tpl->setVariable("TYPE", $lng->txt("learning_resources").
959 " (".((int)$cnt["lres"]).")");
960 }
961 $tpl->setVariable("TXT_LINK", "[list-".$type."]");
962 $tpl->parseCurrentBlock();
963 }
964 $tpl->show();
965 exit;
966
967 }
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user

References $_GET, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, exit, and ilUtil\getStyleSheetLocation().

+ Here is the call graph for this function:

◆ showPasswordInstructionObject()

ilContainerGUI::showPasswordInstructionObject (   $a_init = true)
protected

Show webdav password instruction.

Returns

Definition at line 3456 of file class.ilContainerGUI.php.

3457 {
3458 global $tpl,$ilToolbar;
3459
3460 if($a_init)
3461 {
3462 ilUtil::sendInfo($this->lng->txt('webdav_pwd_instruction'));
3464 }
3465
3466 include_once ('Services/WebDAV/classes/class.ilDAVServer.php');
3467 $davServer = ilDAVServer::getInstance();
3468 $ilToolbar->addButton(
3469 $this->lng->txt('mount_webfolder'),
3470 $davServer->getMountURI($this->object->getRefId()),
3471 '_blank',
3472 '',
3473 $davServer->getFolderURI($this->object->getRefId())
3474 );
3475
3476 $tpl->setContent($this->form->getHTML());
3477 }
static getInstance()
Get singelton iunstance.

References ilObjectGUI\$tpl, ilDAVServer\getInstance(), initFormPasswordInstruction(), and ilUtil\sendInfo().

Referenced by savePasswordObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPasteTreeObject()

ilContainerGUI::showPasteTreeObject ( )

Show paste tree.

Definition at line 2094 of file class.ilContainerGUI.php.

2095 {
2096 global $ilTabs, $ilToolbar;
2097
2098 $ilTabs->setTabActive('view_content');
2099
2100 if(!in_array($_SESSION['clipboard']['cmd'], array('link', 'copy', 'cut')))
2101 {
2102 $message = __METHOD__.": Unknown action.";
2103 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
2104 }
2105 $cmd = $_SESSION['clipboard']['cmd'];
2106
2107 //
2108 $exp = $this->getTreeSelectorGUI($cmd);
2109 if ($exp->handleCommand())
2110 {
2111 return;
2112 }
2113 $output = $exp->getHTML();
2114
2115 $txt_var = ($cmd == "copy")
2116 ? "copy"
2117 : "paste";
2118
2119 // toolbars
2120 $t = new ilToolbarGUI();
2121 $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
2122 $t->addFormButton($this->lng->txt($txt_var), "performPasteIntoMultipleObjects");
2123 $t->addSeparator();
2124
2125 $GLOBALS['lng']->loadLanguageModule('obj');
2126 $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
2127
2128 $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
2129 $t->setCloseFormTag(false);
2130 $t->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), " ");
2131 $output = $t->getHTML().$output;
2132 $t->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), " ");
2133 $t->setCloseFormTag(true);
2134 $t->setOpenFormTag(false);
2135 $output.= "<br />".$t->getHTML();
2136
2137 $this->tpl->setContent($output);
2138 }

References $_SESSION, $cmd, $GLOBALS, $t, ilUtil\getImagePath(), and getTreeSelectorGUI().

Referenced by initAndDisplayCopyIntoMultipleObjectsObject(), initAndDisplayLinkIntoMultipleObjectsObject(), initAndDisplayMoveIntoObjectObject(), and performPasteIntoMultipleObjectsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPermanentLink()

ilContainerGUI::showPermanentLink ( $tpl)

show permanent link

Definition at line 725 of file class.ilContainerGUI.php.

726 {
727 $GLOBALS["tpl"]->setPermanentLink($this->object->getType(),
728 $this->object->getRefId(), "", "_top");
729 }

References $GLOBALS.

Referenced by renderObject().

+ Here is the caller graph for this function:

◆ showPossibleSubObjects()

ilContainerGUI::showPossibleSubObjects ( )

show possible sub objects selection list

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCourseGUI, ilObjOrgUnitGUI, and ilObjRecoveryFolderGUI.

Definition at line 424 of file class.ilContainerGUI.php.

425 {
426 include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php";
427 $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
428 $gui->render();
429 }
Render add new item selector.

Referenced by renderObject().

+ Here is the caller graph for this function:

◆ showRepTree()

ilContainerGUI::showRepTree (   $a_initial_call = false)

Show tree.

Parameters
boolean$a_initial_callshould be true if not called through standard $ilCtrl->getCmd() procedure

Definition at line 3641 of file class.ilContainerGUI.php.

3642 {
3643 global $tpl, $ilUser, $ilSetting, $ilCtrl;
3644
3645 // set current repository view mode
3646 if (!empty($_GET["set_mode"]))
3647 {
3648 $_SESSION["il_rep_mode"] = $_GET["set_mode"];
3649 if ($ilUser->getId() != ANONYMOUS_USER_ID)
3650 {
3651 $ilUser->writePref("il_rep_mode", $_GET["set_mode"]);
3652 }
3653 }
3654
3655 // get user setting
3656 if ($_SESSION["il_rep_mode"] == "")
3657 {
3658 if ($ilUser->getId() != ANONYMOUS_USER_ID)
3659 {
3660 $_SESSION["il_rep_mode"] = $ilUser->getPref("il_rep_mode");
3661 }
3662 }
3663
3664 // if nothing set, get default view
3665 if ($_SESSION["il_rep_mode"] == "")
3666 {
3667 $_SESSION["il_rep_mode"] = $ilSetting->get("default_repository_view");
3668 }
3669
3670 $mode = ($_SESSION["il_rep_mode"] != "")
3671 ? $_SESSION["il_rep_mode"]
3672 : "flat";
3673
3674 // check for administration context, see #0016312
3675 if ($mode == "tree" && (strtolower($_GET["baseClass"]) != "iladministrationgui"))
3676 {
3677 include_once("./Services/Repository/classes/class.ilRepositoryExplorerGUI.php");
3678 $exp = new ilRepositoryExplorerGUI($this, "showRepTree");
3679 if (!$exp->handleCommand())
3680 {
3681 $tpl->setLeftNavContent($exp->getHTML());
3682 }
3683 }
3684 }
Repository explorer GUI class.

References $_GET, $_SESSION, $ilCtrl, $ilSetting, $ilUser, and ilObjectGUI\$tpl.

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjFolderGUI\executeCommand(), ilObjGroupGUI\executeCommand(), and ilObjRootFolderGUI\executeCommand().

+ Here is the caller graph for this function:

◆ showTreeFlatIcon()

ilContainerGUI::showTreeFlatIcon ( )

Definition at line 366 of file class.ilContainerGUI.php.

367 {
368 global $tpl;
369
370 // dont show icon, if role (permission gui->rolegui) is edited
371 if ($_GET["obj_id"] != "")
372 {
373 return;
374 }
375 // hide for member view
376 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
377 if(ilMemberViewSettings::getInstance()->isActive())
378 {
379 return;
380 }
381
382 $mode = ($_SESSION["il_rep_mode"] == "flat")
383 ? "tree"
384 : "flat";
385 $link = "ilias.php?baseClass=ilRepositoryGUI&amp;cmd=frameset&amp;set_mode=".$mode."&amp;ref_id=".$this->object->getRefId();
386 $tpl->setTreeFlatIcon($link, $mode);
387 }
static getInstance()
Get instance.

References $_GET, $_SESSION, ilObjectGUI\$tpl, and ilMemberViewSettings\getInstance().

Referenced by prepareOutput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switchToOldEditorObject()

ilContainerGUI::switchToOldEditorObject ( )

Switch to old page editor.

Definition at line 745 of file class.ilContainerGUI.php.

746 {
747 global $ilCtrl;
748
749 $_SESSION["il_cntr_editor"] = "old";
750 $ilCtrl->redirect($this, "editPageFrame");
751 }

References $_SESSION, and $ilCtrl.

◆ switchToStdEditorObject()

ilContainerGUI::switchToStdEditorObject ( )

Switch to standard page editor.

Definition at line 734 of file class.ilContainerGUI.php.

735 {
736 global $ilCtrl;
737
738 $_SESSION["il_cntr_editor"] = "std";
739 $ilCtrl->redirect($this, "editPageFrame");
740 }

References $_SESSION, and $ilCtrl.

◆ trashObject()

ilContainerGUI::trashObject ( )

Show trash content of object.

@access public

Definition at line 3893 of file class.ilContainerGUI.php.

3894 {
3895 global $tpl;
3896
3897 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3898 $ru = new ilRepUtilGUI($this);
3899 $ru->showTrashTable($_GET["ref_id"]);
3900 }

References $_GET, and ilObjectGUI\$tpl.

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

Definition at line 3920 of file class.ilContainerGUI.php.

3921 {
3922 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3923 $ru = new ilRepUtilGUI($this);
3924 $ru->restoreObjects($_GET["ref_id"], $_POST["trash_id"]);
3925 $this->ctrl->redirect($this, "trash");
3926 }

References $_GET, and $_POST.

◆ useNewEditorObject()

ilContainerGUI::useNewEditorObject ( )

Use new editor (-> delete xhtml content page)

Definition at line 756 of file class.ilContainerGUI.php.

757 {
758 global $ilCtrl, $ilAccess, $lng, $ilCtrl;
759
760 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
761 {
762 include_once("./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
763
764 /* keep old page content for now...
765 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
766 "xhtml_page");
767 if ($xpage_id)
768 {
769 $xpage = new ilXHTMLPage($xpage_id);
770 }
771 */
772
773 ilContainer::_writeContainerSetting($this->object->getId(),
774 "xhtml_page", 0);
775
776 ilUtil::sendSuccess($lng->txt("cntr_switched_editor"), true);
777 }
778
779 $ilCtrl->redirect($this, "editPageFrame");
780 }

References $ilCtrl, ilObjectGUI\$lng, ilContainer\_writeContainerSetting(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

Field Documentation

◆ $bl_cnt

ilContainerGUI::$bl_cnt = 1

Definition at line 21 of file class.ilContainerGUI.php.

◆ $multi_download_enabled

ilContainerGUI::$multi_download_enabled = false

Definition at line 22 of file class.ilContainerGUI.php.

Referenced by isMultiDownloadEnabled().


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