ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilContainerGUI Class Reference

Class ilContainerGUI. More...

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

Public Member Functions

 __construct ($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 ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 lockObject ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 show clipboard More...
 
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 @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 list gui for presentation in container @global type $lng. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 showRepTree ()
 Show tree. More...
 
 trashObject ()
 Show trash content of object. More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 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
 
 $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 ()
 
 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...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $app_event_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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
Stefan Hecken stefa.nosp@m.n.he.nosp@m.cken@.nosp@m.conc.nosp@m.epts-.nosp@m.and-.nosp@m.train.nosp@m.ing..nosp@m.de
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Reimplemented in ilObjGroupGUI, ilObjCategoryGUI, ilObjRootFolderGUI, and ilObjFolderGUI.

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

107 {
108 global $DIC;
109
110 $this->lng = $DIC->language();
111 $this->tpl = $DIC["tpl"];
112 $this->ctrl = $DIC->ctrl();
113 $this->tabs = $DIC->tabs();
114 $this->settings = $DIC->settings();
115 $this->user = $DIC->user();
116 $this->db = $DIC->database();
117 $this->access = $DIC->access();
118 $this->tree = $DIC->repositoryTree();
119 $this->error = $DIC["ilErr"];
120 $this->obj_definition = $DIC["objDefinition"];
121 $this->rbacadmin = $DIC->rbac()->admin();
122 $this->rbacreview = $DIC->rbac()->review();
123 $this->log = $DIC["ilLog"];
124 $this->obj_data_cache = $DIC["ilObjDataCache"];
125 $this->toolbar = $DIC->toolbar();
126 $this->plugin_admin = $DIC["ilPluginAdmin"];
127 $this->app_event_handler = $DIC["ilAppEventHandler"];
128 $rbacsystem = $DIC->rbac()->system();
129 $lng = $DIC->language();
130
131 $this->rbacsystem = $rbacsystem;
132
133 $lng->loadLanguageModule("cntr");
134 $lng->loadLanguageModule('cont');
135
136 // prepare output things should generally be made in executeCommand
137 // method (maybe dependent on current class/command
138 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
139 }
user()
Definition: user.php:4
error($a_errmsg)
set error message @access public
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $DIC, ilObjectGUI\$lng, $rbacsystem, error(), settings(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ __showTimingsButton()

ilContainerGUI::__showTimingsButton ( $tpl)

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

822 {
824
825 if (!$tree->checkForParentType($this->object->getRefId(), 'crs')) {
826 return false;
827 }
828 $tpl->setCurrentBlock("custom_button");
829 $tpl->setVariable("ADMIN_MODE_LINK", $this->ctrl->getLinkTargetByClass('ilcoursecontentgui', 'editTimings'));
830 $tpl->setVariable("TXT_ADMIN_MODE", $this->lng->txt('timings_edit'));
831 $tpl->parseCurrentBlock();
832 return true;
833 }

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

◆ _buildPath()

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

build path

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

3007 {
3008 global $DIC;
3009
3010 $tree = $DIC->repositoryTree();
3011
3012 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
3013 $counter = 0;
3014 foreach ($path_arr as $data) {
3015 if ($counter++) {
3016 $path .= " > ";
3017 }
3018 $path .= $data['title'];
3019 }
3020
3021 return $path;
3022 }
$counter

References $counter, ilObjectGUI\$data, $DIC, $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 1141 of file class.ilContainerGUI.php.

1142 {
1143 $icon = ilUtil::getImagePath("icon_" . $a_type . ".svg");
1144 $title = $this->lng->txt("objs_" . $a_type);
1145
1146 if ($a_show_image) {
1147 $a_tpl->setCurrentBlock("container_header_row_image");
1148 $a_tpl->setVariable("HEADER_IMG", $icon);
1149 $a_tpl->setVariable("HEADER_ALT", $title);
1150 } else {
1151 $a_tpl->setCurrentBlock("container_header_row");
1152 }
1153
1154 $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
1155 $a_tpl->parseCurrentBlock();
1156 //$a_tpl->touchBlock("container_row");
1157 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$a_type
Definition: workflow.php:92

References $a_type, $title, and 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 1229 of file class.ilContainerGUI.php.

1230 {
1231 $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1232 ? "row_type_2"
1233 : "row_type_1";
1234
1235 $a_tpl->touchBlock($this->cur_row_type);
1236
1237 $type = $this->lng->txt("obj_" . $a_type);
1238 $a_message = str_replace("[type]", $type, $a_message);
1239
1240 $a_tpl->setVariable("ROW_NBSP", " ");
1241
1242 $a_tpl->setCurrentBlock("container_standard_row");
1243 $a_tpl->setVariable(
1244 "BLOCK_ROW_CONTENT",
1245 $a_message
1246 );
1247 $a_tpl->parseCurrentBlock();
1248 $a_tpl->touchBlock("container_row");
1249 }
$type

References $a_type, and $type.

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

Add page tabs.

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

381 {
382 $ilTabs = $this->tabs;
384
385 $ilTabs->addTarget(
386 "obj_sty",
387 $ilCtrl->getLinkTarget($this, 'editStyleProperties'),
388 "editStyleProperties"
389 );
390 }
global $ilCtrl
Definition: ilias.php:18

References ilObjectGUI\$ctrl, $ilCtrl, and $tabs.

◆ addStandardContainerSubTabs()

ilContainerGUI::addStandardContainerSubTabs (   $a_include_view = true)

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

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

1289 {
1290 $ilTabs = $this->tabs;
1291 $ilAccess = $this->access;
1292 $lng = $this->lng;
1296
1297 if (!is_object($this->object)) {
1298 return;
1299 }
1300
1301 if ($a_include_view && $ilAccess->checkAccess("read", "", $this->object->getRefId())) {
1302 if (!$this->isActiveAdministrationPanel()) {
1303 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "view"));
1304 } else {
1305 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "disableAdministrationPanel"));
1306 }
1307 }
1308
1309 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1310 (
1311 $this->adminCommands ||
1312 (is_object($this->object) &&
1313 ($ilAccess->checkAccess("write", "", $this->object->getRefId())))
1314 ||
1315 (is_object($this->object) &&
1316 ($this->object->getHiddenFilesFound())) ||
1317 $_SESSION["clipboard"]
1318 )
1319 ) {
1320 if ($this->isActiveAdministrationPanel()) {
1321 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
1322 } else {
1323 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, "enableAdministrationPanel"));
1324 }
1325 }
1326 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1327 is_object($this->object) &&
1328 $ilAccess->checkAccess("write", "", $this->object->getRefId()) /* &&
1329 $this->object->getOrderType() == ilContainer::SORT_MANUAL */ // always on because of custom block order
1330 ) {
1331 $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
1332 }
1333 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1334 is_object($this->object) &&
1335 $ilAccess->checkAccess("write", "", $this->object->getRefId())
1336 ) {
1337 if ($ilSetting->get("enable_cat_page_edit")) {
1338 $ilTabs->addSubTab(
1339 "page_editor",
1340 $lng->txt("cntr_text_media_editor"),
1341 $ilCtrl->getLinkTarget($this, "editPageFrame"),
1342 ilFrameTargetInfo::_getFrame("MainContent")
1343 );
1344 }
1345 }
1346 }
$_SESSION["AccountId"]
static _getFrame($a_class, $a_type='')
Get content frame name.
global $ilSetting
Definition: privfeed.php:17
$ilUser
Definition: imgupload.php:18

References $_SESSION, $access, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, $ilUser, ilObjectGUI\$lng, $settings, $tabs, $user, ilFrameTargetInfo\_getFrame(), and isActiveAdministrationPanel().

Referenced by ilObjCourseGUI\setContentSubTabs(), ilObjOrgUnitGUI\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 1166 of file class.ilContainerGUI.php.

1172 {
1174
1175 $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1176 ? "row_type_2"
1177 : "row_type_1";
1178
1179 $a_tpl->touchBlock($this->cur_row_type);
1180
1181 $nbsp = true;
1182 if ($ilSetting->get("icon_position_in_lists") == "item_rows") {
1183 $icon = ilUtil::getImagePath("icon_" . $a_image_type . ".svg");
1184 $alt = $this->lng->txt("obj_" . $a_image_type);
1185
1186 // custom icon
1187 if ($ilSetting->get("custom_icons") &&
1188 in_array($a_image_type, array("cat","grp","crs"))) {
1189 require_once("./Services/Container/classes/class.ilContainer.php");
1190 if (($path = ilContainer::_lookupIconPath($a_item_obj_id, "small")) != "") {
1191 $icon = $path;
1192 }
1193 }
1194
1195 $a_tpl->setCurrentBlock("block_row_image");
1196 $a_tpl->setVariable("ROW_IMG", $icon);
1197 $a_tpl->setVariable("ROW_ALT", $alt);
1198 $a_tpl->parseCurrentBlock();
1199 $nbsp = false;
1200 }
1201
1202 if ($this->isActiveAdministrationPanel()) {
1203 $a_tpl->setCurrentBlock("block_row_check");
1204 $a_tpl->setVariable("ITEM_ID", $a_item_ref_id);
1205 $a_tpl->parseCurrentBlock();
1206 $nbsp = false;
1207 }
1208 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
1209 if ($this->isActiveAdministrationPanel() &&
1211 $a_tpl->setCurrentBlock('block_position');
1212 $a_tpl->setVariable('POS_TYPE', $a_image_type);
1213 $a_tpl->setVariable('POS_ID', $a_item_ref_id);
1214 $a_tpl->setVariable('POSITION', sprintf('%.1f', $this->current_position++));
1215 $a_tpl->parseCurrentBlock();
1216 }
1217 if ($nbsp) {
1218 $a_tpl->setVariable("ROW_NBSP", " ");
1219 }
1220 $a_tpl->setCurrentBlock("container_standard_row");
1221 $a_tpl->setVariable("BLOCK_ROW_CONTENT", $a_html);
1222 $a_tpl->parseCurrentBlock();
1223 $a_tpl->touchBlock("container_row");
1224 }
sprintf('%.4f', $callTime)
static _lookupSortMode($a_obj_id)
lookup sort mode
static _lookupIconPath($a_id, $a_size="big")
lookup icon path

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

+ Here is the call graph for this function:

◆ addToDeskObject()

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

Implements ilDesktopItemHandling.

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

1444 {
1446 $lng = $this->lng;
1447
1448 if ((int) $ilSetting->get('disable_my_offers')) {
1449 return $this->renderObject();
1450 }
1451
1452 include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1454 ilUtil::sendSuccess($lng->txt("added_to_desktop"));
1455 $this->renderObject();
1456 }
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, $settings, 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 196 of file class.ilContainerGUI.php.

197 {
198 // check if template is changed
199 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
201 $this->object->getRefId()
202 );
203 $new_tpl_id = (int) $this->getDidacticTemplateVar('dtpl');
204
205 if ($new_tpl_id != $current_tpl_id) {
206 $_REQUEST['tplid'] = $new_tpl_id;
207
208 // redirect to didactic template confirmation
209 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
210 $this->ctrl->setReturn($this, 'edit');
211 $this->ctrl->setCmdClass('ildidactictemplategui');
212 $this->ctrl->setCmd('confirmTemplateSwitch');
213 $dtpl_gui = new ilDidacticTemplateGUI($this);
214 return $this->ctrl->forwardCommand($dtpl_gui);
215 }
216 parent::afterUpdate();
217 }
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.

References 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 2719 of file class.ilContainerGUI.php.

2720 {
2721 return true;
2722 }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

2712 {
2713 return true;
2714 }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

Reimplemented in ilObjOrgUnitGUI.

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

2276 {
2277 unset($_SESSION['clipboard']);
2278 $GLOBALS['ilCtrl']->returnToParent($this);
2279 }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $_SESSION, and $GLOBALS.

◆ cancelPageContentObject()

ilContainerGUI::cancelPageContentObject ( )

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

1038 {
1039 $this->ctrl->redirect($this, "");
1040 }

◆ clearAdminCommandsDetermination()

ilContainerGUI::clearAdminCommandsDetermination ( )

cleaer administration commands determination

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

1091 {
1092 $this->adminCommands = false;
1093 }

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

@access public

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

1901 {
1902 unset($_SESSION["clipboard"]);
1903 unset($_SESSION["il_rep_clipboard"]);
1904
1905 //var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1906
1907 // only redirect if clipboard was cleared
1908 if (isset($_POST["cmd"]["clear"])) {
1909 ilUtil::sendSuccess($this->lng->txt("msg_clear_clipboard"), true);
1910 // fixed mantis 0018474: Clear Clipboard redirects to Subtab View, instead of Subtab "Edit Multiple"
1911 $this->ctrl->redirect($this, 'render');
1912 }
1913 }
$_POST["username"]

References $_POST, $_SESSION, 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 ( )

show clipboard

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

2572 {
2575 $ilTabs = $this->tabs;
2576 $tpl = $this->tpl;
2577 $ilToolbar = $this->toolbar;
2579 $lng = $this->lng;
2580
2581 $ilTabs->activateTab("clipboard");
2582
2583 // function should not be called if clipboard is empty
2584 if (empty($_SESSION['clipboard']) or !is_array($_SESSION['clipboard'])) {
2585 $message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2586 $ilLog->write($message, $ilLog->FATAL);
2587 $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->WARNING);
2588 }
2589
2590 $data = array();
2591 foreach ($_SESSION["clipboard"]["ref_ids"] as $ref_id) {
2592 if (!$tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id, false)) {
2593 continue;
2594 }
2595
2596 $data[] = array(
2597 "type" => $tmp_obj->getType(),
2598 "type_txt" => $this->lng->txt("obj_" . $tmp_obj->getType()),
2599 "title" => $tmp_obj->getTitle(),
2600 "cmd" => ($_SESSION["clipboard"]["cmd"] == "cut") ? $this->lng->txt("move") :$this->lng->txt($_SESSION["clipboard"]["cmd"]),
2601 "ref_id" => $ref_id,
2602 "obj_id" => $tmp_obj->getId()
2603 );
2604
2605 unset($tmp_obj);
2606 }
2607
2608 include_once("./Services/Object/classes/class.ilObjClipboardTableGUI.php");
2609 $tab = new ilObjClipboardTableGUI($this, "clipboard");
2610 $tab->setData($data);
2611 $tpl->setContent($tab->getHTML());
2612
2613 if (count($data) > 0) {
2614 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2615 $ilToolbar->addFormButton(
2616 $lng->txt("insert_object_here"),
2617 "paste"
2618 );
2619 $ilToolbar->addFormButton(
2620 $lng->txt("clear_clipboard"),
2621 "clear"
2622 );
2623 }
2624
2625 return true;
2626 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
catch(Exception $e) $message

References $_SESSION, ilObjectGUI\$ctrl, ilObjectGUI\$data, $error, $ilCtrl, ilObjectGUI\$ilErr, $ilLog, ilObjectGUI\$lng, $log, $message, ilObjectGUI\$ref_id, $tab, $tabs, $toolbar, ilObjectGUI\$tpl, ilObjectFactory\getInstanceByRefId(), and sprintf.

+ 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 2864 of file class.ilContainerGUI.php.

2865 {
2868
2869 include_once('./Services/Link/classes/class.ilLink.php');
2870 include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
2871
2872 $ilAccess = $this->access;
2877
2878 $new_type = $_REQUEST['new_type'];
2879 $ref_id = (int) $_GET['ref_id'];
2880 $clone_source = (int) $_REQUEST['clone_source'];
2881
2882 if (!$rbacsystem->checkAccess('create', $ref_id, $new_type)) {
2883 $ilErr->raiseError($this->lng->txt('permission_denied'));
2884 }
2885 if (!$clone_source) {
2886 ilUtil::sendFailure($this->lng->txt('select_one'));
2887 $this->createObject();
2888 return false;
2889 }
2890 if (!$ilAccess->checkAccess('write', '', $clone_source, $new_type)) {
2891 $ilErr->raiseError($this->lng->txt('permission_denied'));
2892 }
2893
2894 $options = $_POST['cp_options'] ? $_POST['cp_options'] : array();
2896 $result = $orig->cloneAllObject($_COOKIE['PHPSESSID'], $_COOKIE['ilClientId'], $new_type, $ref_id, $clone_source, $options);
2897
2898 include_once './Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
2899 if (ilCopyWizardOptions::_isFinished($result['copy_id'])) {
2900 ilUtil::sendSuccess($this->lng->txt("object_duplicated"), true);
2901 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $result['ref_id']);
2902 $ilCtrl->redirectByClass("ilrepositorygui", "");
2903 } else {
2904 ilUtil::sendInfo($this->lng->txt("object_copy_in_progress"), true);
2905 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
2906 $ilCtrl->redirectByClass("ilrepositorygui", "");
2907 }
2908 }
$result
$_COOKIE['client_id']
Definition: server.php:9
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
$_GET["client_id"]
static _isFinished($a_copy_id)
check if copy is finished
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.

References $_COOKIE, $_GET, $_POST, $access, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, $ilLog, $ilUser, $log, $options, $orig, $rbacsystem, ilObjectGUI\$ref_id, $result, ilObjectGUI\$tree, $user, ilCopyWizardOptions\_isFinished(), 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 2942 of file class.ilContainerGUI.php.

2943 {
2945
2946 // clone the source node
2947 $srcObj = ilObjectFactory::getInstanceByRefId($srcRef);
2948 error_log(__METHOD__ . ' cloning srcRef=' . $srcRef . ' dstRef=' . $dstRef . '...');
2949 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
2950 error_log(__METHOD__ . ' ...cloning... newRef=' . $newRef . '...');
2951
2952 // We must immediately apply a new name to the object, to
2953 // prevent confusion of WebDAV clients about having two objects with identical
2954 // name in the repository.
2955 if (!is_null($newName)) {
2956 $newObj = ilObjectFactory::getInstanceByRefId($newRef);
2957 $newObj->setTitle($newName);
2958 $newObj->update();
2959 unset($newObj);
2960 }
2961 unset($srcObj);
2962 $mapping[$newRef] = $srcRef;
2963
2964 // clone all children of the source node
2965 $children = $tree->getChilds($srcRef);
2966 foreach ($tree->getChilds($srcRef) as $child) {
2967 // Don't clone role folders, because it does not make sense to clone local roles
2968 // FIXME - Maybe it does make sense (?)
2969 if ($child["type"] != 'rolf') {
2970 $this->cloneNodes($child["ref_id"], $newRef, $mapping);
2971 } else {
2972 if (count($rolf = $tree->getChildsByType($newRef, "rolf"))) {
2973 $mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
2974 }
2975 }
2976 }
2977 error_log(__METHOD__ . ' ...cloned srcRef=' . $srcRef . ' dstRef=' . $dstRef . ' newRef=' . $newRef);
2978 return $newRef;
2979 }
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.

References ilObjectGUI\$tree, cloneNodes(), Monolog\Handler\error_log(), and ilObjectFactory\getInstanceByRefId().

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 2743 of file class.ilContainerGUI.php.

2744 {
2745 $this->cloneWizardPageObject(false);
2746 }
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 2754 of file class.ilContainerGUI.php.

2755 {
2756 include_once('Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2757
2758 $ilObjDataCache = $this->obj_data_cache;
2760
2761 if (!$_REQUEST['clone_source']) {
2762 ilUtil::sendFailure($this->lng->txt('select_one'));
2763 if (isset($_SESSION['wizard_search_title'])) {
2764 $this->searchCloneSourceObject();
2765 } else {
2766 $this->createObject();
2767 }
2768 return false;
2769 }
2770 $source_id = $_REQUEST['clone_source'];
2771 $new_type = $_REQUEST['new_type'];
2772 $this->ctrl->setParameter($this, 'clone_source', (int) $_REQUEST['clone_source']);
2773 $this->ctrl->setParameter($this, 'new_type', $new_type);
2774
2775
2776 // Generell JavaScript
2777 $this->tpl->addJavaScript('./Services/CopyWizard/js/ilContainer.js');
2778 $this->tpl->setVariable('BODY_ATTRIBUTES', 'onload="ilDisableChilds(\'cmd\');"');
2779
2780
2781 $this->tpl->addBlockFile(
2782 'ADM_CONTENT',
2783 'adm_content',
2784 'tpl.container_wizard_page.html',
2785 "Services/Container"
2786 );
2787 $this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this));
2788 $this->tpl->setVariable('TYPE_IMG', ilUtil::getImagePath('icon_' . $new_type . '.svg'));
2789 $this->tpl->setVariable('ALT_IMG', $this->lng->txt('obj_' . $new_type));
2790 $this->tpl->setVariable('TXT_DUPLICATE', $this->lng->txt($new_type . '_wizard_page'));
2791 $this->tpl->setVariable('INFO_DUPLICATE', $this->lng->txt($new_type . '_copy_threads_info'));
2792 $this->tpl->setVariable('BTN_COPY', $this->lng->txt('obj_' . $new_type . '_duplicate'));
2793 $this->tpl->setVariable('BTN_BACK', $this->lng->txt('btn_back'));
2794 if (isset($_SESSION['wizard_search_title'])) {
2795 $this->tpl->setVariable('CMD_BACK', 'searchCloneSource');
2796 } else {
2797 $this->tpl->setVariable('CMD_BACK', 'create');
2798 }
2799
2800 $this->tpl->setVariable('BTN_TREE', $this->lng->txt('treeview'));
2801 $this->tpl->setVariable('BTN_LIST', $this->lng->txt('flatview'));
2802
2803 // Fill item rows
2804 // tree view
2805 if ($a_tree_view) {
2806 $first = true;
2807 $has_items = false;
2808 foreach ($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id), true) as $node) {
2809 if ($first == true) {
2810 $first = false;
2811 continue;
2812 }
2813
2814 if ($node['type'] == 'rolf') {
2815 continue;
2816 }
2817
2818 $has_items = true;
2819
2820 for ($i = $source_node['depth'];$i < $node['depth']; $i++) {
2821 $this->tpl->touchBlock('padding');
2822 $this->tpl->touchBlock('end_padding');
2823 }
2824 // fill options
2825 $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id, $node['type']);
2826 $copy_wizard_page->fillTreeSelection($node['ref_id'], $node['type'], $node['depth']);
2827
2828 $this->tpl->setCurrentBlock('tree_row');
2829 $this->tpl->setVariable('TREE_IMG', ilUtil::getImagePath('icon_' . $node['type'] . '.svg'));
2830 $this->tpl->setVariable('TREE_ALT_IMG', $this->lng->txt('obj_' . $node['type']));
2831 $this->tpl->setVariable('TREE_TITLE', $node['title']);
2832 $this->tpl->parseCurrentBlock();
2833 }
2834 if (!$has_items) {
2835 $this->tpl->setCurrentBlock('no_content');
2836 $this->tpl->setVariable('TXT_NO_CONTENT', $this->lng->txt('container_no_items'));
2837 $this->tpl->parseCurrentBlock();
2838 } else {
2839 $this->tpl->setCurrentBlock('tree_footer');
2840 $this->tpl->setVariable('TXT_COPY_ALL', $this->lng->txt('copy_all'));
2841 $this->tpl->setVariable('TXT_LINK_ALL', $this->lng->txt('link_all'));
2842 $this->tpl->setVariable('TXT_OMIT_ALL', $this->lng->txt('omit_all'));
2843 $this->tpl->parseCurrentBlock();
2844 }
2845 } else {
2846 foreach ($tree->getSubTreeTypes($source_id, array('rolf','crs')) as $type) {
2847 $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id, $type);
2848 if (strlen($html = $copy_wizard_page->getWizardPageBlockHTML())) {
2849 $this->tpl->setCurrentBlock('obj_row');
2850 $this->tpl->setVariable('ITEM_BLOCK', $html);
2851 $this->tpl->parseCurrentBlock();
2852 }
2853 }
2854 }
2855 }
static _getInstanceByType($a_source_id, $a_item_type)
Get instance by type.
$i
Definition: disco.tpl.php:19
$html
Definition: example_001.php:87

References $_SESSION, $html, $i, $obj_data_cache, ilObjectGUI\$tree, $type, 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 2731 of file class.ilContainerGUI.php.

2732 {
2733 $this->cloneWizardPageObject(true);
2734 }

References cloneWizardPageObject().

+ Here is the call graph for this function:

◆ confirmRemoveFromSystemObject()

ilContainerGUI::confirmRemoveFromSystemObject ( )

confirmation screen remove from system

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

3723 {
3724 $lng = $this->lng;
3725 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3726
3727 if (!isset($_POST["trash_id"])) {
3728 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3729 $this->ctrl->redirect($this, "trash");
3730 }
3731
3732 $ru = new ilRepUtilGUI($this);
3733 $ru->confirmRemoveFromSystemObject($_POST["trash_id"]);
3734 }
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 1814 of file class.ilContainerGUI.php.

1815 {
1816 $newFilename = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1817
1818 // copy to temporary directory
1820
1821 if (!copy($oldFilename, $newFilename)) {
1822 throw new ilFileException("Could not copy " . $oldFilename . " to " . $newFilename);
1823 }
1824
1825 touch($newFilename, filectime($oldFilename));
1826 }
Class to report exception.
static _lookupAbsolutePath($obj_id, $a_version=null)
static getASCIIFilename($a_filename)
convert utf8 to ascii filename

References ilObjectGUI\$obj_id, $title, 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 1600 of file class.ilContainerGUI.php.

1601 {
1606
1607 $no_copy = [];
1608
1609 if ($_GET["item_ref_id"] != "") {
1610 $_POST["id"] = array($_GET["item_ref_id"]);
1611 }
1612
1613 if (!isset($_POST["id"])) {
1614 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1615 }
1616
1617 // FOR ALL OBJECTS THAT SHOULD BE COPIED
1618 $containers = 0;
1619 foreach ($_POST["id"] as $ref_id) {
1620 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1621 $node_data = $this->tree->getNodeData($ref_id);
1622
1623 // count containers
1624 if ($objDefinition->isContainer($node_data["type"])) {
1625 $containers++;
1626 }
1627
1628 $subtree_nodes = $this->tree->getSubTree($node_data);
1629
1630 $all_node_data[] = $node_data;
1631 $all_subtree_nodes[] = $subtree_nodes;
1632
1633 // CHECK COPY PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1634 foreach ($subtree_nodes as $node) {
1635 if ($node['type'] == 'rolf') {
1636 continue;
1637 }
1638
1639 if (!$rbacsystem->checkAccess('visible,read,copy', $node["ref_id"])) {
1640 $no_copy[] = $node["ref_id"];
1641 }
1642 }
1643 }
1644
1645 if ($containers > 0 && count($_POST["id"]) > 1) {
1646 $ilErr->raiseError($this->lng->txt("cntr_container_only_on_their_own"), $ilErr->MESSAGE);
1647 }
1648
1649 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1650 if (is_array($no_copy) && count($no_copy)) {
1651 $titles = array();
1652 foreach ((array) $no_copy as $copy_id) {
1653 $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($copy_id));
1654 }
1655 $ilErr->raiseError(
1656 $this->lng->txt("msg_no_perm_copy") . " " . implode(',', $titles),
1657 $ilErr->MESSAGE
1658 );
1659 }
1660
1661 // if we have a single container, set it as source id and redirect to ilObjectCopyGUI
1662 if (count($_POST["id"]) == 1) {
1663 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $_POST["id"][0]);
1664 $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1665 } else {
1666 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode($_POST["id"], "_"));
1667 $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1668 }
1669
1670 $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1671 $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1672 $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1673
1674 ilUtil::sendInfo($this->lng->txt("msg_copy_clipboard"), true);
1675
1677 } // END COPY
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, $obj_definition, ilObjectGUI\$objDefinition, $rbacsystem, ilObjectGUI\$ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), initAndDisplayCopyIntoMultipleObjectsObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ createStyleObject()

ilContainerGUI::createStyleObject ( )

Create Style.

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

3161 {
3163
3164 $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
3165 }

References ilObjectGUI\$ctrl, and $ilCtrl.

◆ cutObject()

ilContainerGUI::cutObject ( )

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

@access public

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

1538 {
1542
1543 if ($_GET["item_ref_id"] != "") {
1544 $_POST["id"] = array($_GET["item_ref_id"]);
1545 }
1546
1547 $no_cut = [];
1548
1549 if (!isset($_POST["id"])) {
1550 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1551 }
1552
1553 // FOR ALL OBJECTS THAT SHOULD BE COPIED
1554 foreach ($_POST["id"] as $ref_id) {
1555 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1556 $node_data = $this->tree->getNodeData($ref_id);
1557 $subtree_nodes = $this->tree->getSubTree($node_data);
1558
1559 $all_node_data[] = $node_data;
1560 $all_subtree_nodes[] = $subtree_nodes;
1561
1562 // CHECK DELETE PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1563 foreach ($subtree_nodes as $node) {
1564 if ($node['type'] == 'rolf') {
1565 continue;
1566 }
1567
1568 if (!$rbacsystem->checkAccess('delete', $node["ref_id"])) {
1569 $no_cut[] = $node["ref_id"];
1570 }
1571 }
1572 }
1573 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1574 if (count($no_cut)) {
1575 $titles = array();
1576 foreach ((array) $no_cut as $cut_id) {
1577 $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($cut_id));
1578 }
1579 $ilErr->raiseError(
1580 $this->lng->txt("msg_no_perm_cut") . " " . implode(',', (array) $titles),
1581 $ilErr->MESSAGE
1582 );
1583 }
1584 $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1585 $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1586 $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1587
1588 ilUtil::sendInfo($this->lng->txt("msg_cut_clipboard"), true);
1589
1590 return $this->initAndDisplayMoveIntoObjectObject();
1591 } // END CUT

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, $rbacsystem, ilObjectGUI\$ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), initAndDisplayMoveIntoObjectObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ deleteStyleObject()

ilContainerGUI::deleteStyleObject ( )

Delete Style.

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

3181 {
3183
3184 $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
3185 }

References ilObjectGUI\$ctrl, and $ilCtrl.

◆ disableAdministrationPanelObject()

ilContainerGUI::disableAdministrationPanelObject ( )

enable administration panel

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

1400 {
1401 $_SESSION["il_cont_admin_panel"] = false;
1402 $this->ctrl->redirect($this, "render");
1403 }

References $_SESSION.

◆ downloadMultipleObjects()

ilContainerGUI::downloadMultipleObjects (   $a_ref_ids)
private

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

1728 {
1729 $lng = $this->lng;
1731 $ilAccess = $this->access;
1732
1733 include_once 'Modules/Folder/classes/class.ilObjFolder.php';
1734 include_once 'Modules/File/classes/class.ilObjFile.php';
1735 include_once 'Modules/File/classes/class.ilFileException.php';
1736
1737 // create temporary file to download
1738 $zip = PATH_TO_ZIP;
1739 $tmpdir = ilUtil::ilTempnam();
1740 ilUtil::makeDir($tmpdir);
1741
1742 try {
1743 // copy each selected object
1744 foreach ($a_ref_ids as $ref_id) {
1745 if (!$ilAccess->checkAccess("read", "", $ref_id)) {
1746 continue;
1747 }
1748
1750 continue;
1751 }
1752
1753 // get object
1755 $obj_type = $object->getType();
1756 if ($obj_type == "fold") {
1757 // copy folder to temp directory
1758 self::recurseFolder($ref_id, $object->getTitle(), $tmpdir);
1759 } elseif ($obj_type == "file") {
1760 // copy file to temp directory
1761 self::copyFile($object->getId(), $object->getTitle(), $tmpdir);
1762 }
1763 }
1764
1765 // compress the folder
1766 $deliverFilename = ilUtil::getAsciiFilename($this->object->getTitle()) . ".zip";
1767 $tmpzipfile = ilUtil::ilTempnam() . ".zip";
1768 ilUtil::zip($tmpdir, $tmpzipfile, true);
1769 ilUtil::delDir($tmpdir);
1770 ilUtil::deliverFile($tmpzipfile, $deliverFilename, '', false, true, true);
1771 } catch (ilFileException $e) {
1772 ilUtil::sendInfo($e->getMessage(), true);
1773 }
1774 }
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...
static _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)
zips given directory/file into given zip.file
static ilTempnam($a_temp_path=null)
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 $access, ilObjectGUI\$lng, ilObjectGUI\$object, $rbacsystem, ilObjectGUI\$ref_id, ilObject\_isInTrash(), copyFile(), ilUtil\delDir(), ilUtil\deliverFile(), ilObjectFactory\getInstanceByRefId(), 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 1679 of file class.ilContainerGUI.php.

1680 {
1683
1684 $no_download = [];
1685 $no_perm = [];
1686
1687 if ($_GET["item_ref_id"] != "") {
1688 $_POST["id"] = array($_GET["item_ref_id"]);
1689 }
1690
1691 if (!isset($_POST["id"])) {
1692 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1693 }
1694
1695 // FOR ALL OBJECTS THAT SHOULD BE DOWNLOADED
1696 foreach ($_POST["id"] as $ref_id) {
1698 $obj_type = $object->getType();
1699 if (!in_array($obj_type, array("fold", "file"))) {
1700 $no_download[] = $object->getType();
1701 } elseif (!$rbacsystem->checkAccess('read', $ref_id)) {
1702 $no_perm[] = $ref_id;
1703 }
1704 }
1705
1706 // IF THERE IS ANY OBJECT THAT CANNOT BE DOWNLOADED
1707 if (count($no_download)) {
1708 $no_download = array_unique($no_download);
1709 foreach ($no_download as $type) {
1710 $txt_objs[] = $this->lng->txt("objs_" . $type);
1711 }
1712 $ilErr->raiseError(implode(', ', $txt_objs) . " " . $this->lng->txt("msg_obj_no_download"), $ilErr->MESSAGE);
1713 }
1714
1715 // NO ACCESS
1716 if (count($no_perm)) {
1717 $ilErr->raiseError(
1718 $this->lng->txt("msg_obj_perm_download") . " " . implode(',', $no_perm),
1719 $ilErr->MESSAGE
1720 );
1721 }
1722
1723 // download the objects
1724 $this->downloadMultipleObjects($_POST["id"]);
1725 }
downloadMultipleObjects($a_ref_ids)

References $_GET, $_POST, $error, ilObjectGUI\$ilErr, ilObjectGUI\$object, $rbacsystem, ilObjectGUI\$ref_id, $type, downloadMultipleObjects(), and ilObjectFactory\getInstanceByRefId().

+ Here is the call graph for this function:

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

Edit order.

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

1409 {
1410 $ilTabs = $this->tabs;
1411
1412 $this->edit_order = true;
1413 $_SESSION["il_cont_admin_panel"] = false;
1414 $this->renderObject();
1415
1416 $ilTabs->activateSubTab("ordering");
1417 }

References $_SESSION, $tabs, 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 925 of file class.ilContainerGUI.php.

926 {
932
933 if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
934 $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
935 }
936
938 $this->object->getId(),
939 "xhtml_page"
940 );
941 if ($xpage_id > 0) {
942 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
943 $xpage = new ilXHTMLPage($xpage_id);
944 $content = $xpage->getContent();
945 }
946
947 // get template
948 $tpl->addBlockFile(
949 "ADM_CONTENT",
950 "adm_content",
951 "tpl.container_edit_page_content.html",
952 "Services/Container"
953 );
954 $tpl->setVariable("VAL_CONTENT", ilUtil::prepareFormOutput($content));
955 $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
956 $tpl->setVariable(
957 "TXT_EDIT_PAGE_CONTENT",
958 $this->lng->txt("edit_page_content")
959 );
960 $tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
961 $tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
962 $tpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_old_editor_warning"));
963 $tpl->setVariable("TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt("cntr_old_editor_open_standard_editor"));
964 $tpl->setVariable("IMG_WARNING", ilUtil::getImagePath("icon_alert.svg"));
965 $tpl->setVariable("HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this, "switchToStdEditor"));
966 $tpl->setVariable("ALT_WARNING", $lng->txt("warning"));
967
968 include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
969 include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
970 //$ta = new ilTextAreaInputGUI();
971 //$tags = $ta->getRteTagSet("extended_table_img");
972
973 // add rte support
974 include_once "./Services/RTE/classes/class.ilRTE.php";
975 $rtestring = ilRTE::_getRTEClassname();
976 include_once "./Services/RTE/classes/class.$rtestring.php";
977 $rte = new $rtestring();
978 //$rte->addPlugin("latex");
979 include_once "./Services/Object/classes/class.ilObject.php";
981 $obj_type = ilObject::_lookupType($_GET["ref_id"], true);
982 $rte->addRTESupport($obj_id, $obj_type);
983 //$rte->setStyleSelect(true);
984 //$rte->addCustomRTESupport($obj_id, $obj_type, $tags);
985 }
static _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, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$obj_id, $rbacsystem, 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 906 of file class.ilContainerGUI.php.

907 {
908 // old tiny stuff
910 $this->object->getId(),
911 "xhtml_page"
912 );
913 if ($xpage_id > 0 && $_SESSION["il_cntr_editor"] != "std") {
914 $this->ctrl->redirect($this, "editPageContent");
915 } else {
916 $this->ctrl->redirectByClass(array("ilcontainerpagegui"), "edit");
917 }
918 }

References $_SESSION, and ilContainer\_lookupContainerSetting().

+ Here is the call graph for this function:

◆ editStyleObject()

ilContainerGUI::editStyleObject ( )

Edit Style.

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

3171 {
3173
3174 $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
3175 }

References ilObjectGUI\$ctrl, and $ilCtrl.

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

Edit style properties.

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

3032 {
3033 $ilTabs = $this->tabs;
3034 $tpl = $this->tpl;
3035
3036 $this->checkPermission("write");
3037
3038 $this->initStylePropertiesForm();
3039 $tpl->setContent($this->form->getHTML());
3040
3041 $ilTabs->activateTab("obj_sty");
3042 }
initStylePropertiesForm()
Init style properties form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

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

+ Here is the call graph for this function:

◆ enableAdministrationPanelObject()

ilContainerGUI::enableAdministrationPanelObject ( )

enable administration panel

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

1391 {
1392 $_SESSION["il_cont_admin_panel"] = true;
1393 $this->ctrl->redirect($this, "render");
1394 }

References $_SESSION.

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

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

1480 {
1481 $this->multi_download_enabled = true;
1482 $this->renderObject();
1483 }

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, ilObjOrgUnitGUI, ilObjRootFolderGUI, ilObjStudyProgrammeGUI, and ilObjRecoveryFolderGUI.

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

146 {
148
149 $next_class = $this->ctrl->getNextClass();
150 $cmd = $this->ctrl->getCmd("render");
151
152
153 switch ($next_class) {
154 // page editing
155 case "ilcontainerpagegui":
156 if ($_GET["redirectSource"] != "ilinternallinkgui") {
157 $ret = $this->forwardToPageObject();
158 $tpl->setContent($ret);
159 } else {
160 return "";
161 }
162 break;
163
164 case "ilobjstylesheetgui":
165 $this->forwardToStyleSheet();
166 break;
167
168 default:
169 $this->prepareOutput();
170 $cmd .= "Object";
171 $this->$cmd();
172 break;
173 }
174 return true;
175 }
& forwardToPageObject()
forward command to page object
prepareOutput($a_show_subobjects=true)
prepare output
forwardToStyleSheet()
Forward to style object.
$ret
Definition: parser.php:6

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

+ Here is the call graph for this function:

◆ fileManagerLaunchObject()

ilContainerGUI::fileManagerLaunchObject ( )
protected

Launch jnlp.

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

3402 {
3404
3405 $tpl = new ilTemplate('tpl.fm_launch_ws.html', false, false, 'Services/WebServices/FileManager');
3406 $tpl->setVariable('JNLP_URL', ILIAS_HTTP_PATH . '/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
3407 $tpl->setVariable('SESSION_ID', $_COOKIE['PHPSESSID'] . '::' . CLIENT_ID);
3408 $tpl->setVariable('UID', $ilUser->getId());
3409 $tpl->setVariable('REF_ID', $this->object->getRefId());
3410 $tpl->setVariable('WSDL_URI', ILIAS_HTTP_PATH . '/webservice/soap/server.php?wsdl');
3411 $tpl->setVariable('LOCAL_FRAME', ilFMSettings::getInstance()->isLocalFSEnabled() ? 1 : 0);
3412 $tpl->setVariable('REST_URI', ILIAS_HTTP_PATH . '/Services/WebServices/Rest/server.php');
3413 $tpl->setVariable('FILE_LOCKS', 0);
3414 $tpl->setVariable('UPLOAD_FILESIZE', ilFMSettings::getInstance()->getMaxFileSize());
3415
3416 include_once("./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
3417 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
3418 $tpl->setVariable('HEADER_TITLE', $header_top_title ? $header_top_title : '');
3419 echo $tpl->get();
3420 exit;
3421 }
static getInstance()
Get singleton instance.
special template class to simplify handling of ITX/PEAR

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

+ Here is the call graph for this function:

◆ forwardToPageObject()

& ilContainerGUI::forwardToPageObject ( )

forward command to page object

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

259 {
261 $ilTabs = $this->tabs;
263
264 $cmd = $ilCtrl->getCmd();
265
266 if (in_array($cmd, array("displayMediaFullscreen", "downloadFile", "displayMedia"))) {
267 $this->checkPermission("read");
268 } else {
269 $this->checkPermission("write");
270 }
271
272 $ilTabs->clearTargets();
273
274 if ($_GET["redirectSource"] == "ilinternallinkgui") {
275 exit;
276 }
277
279 $this->object->getId(),
280 "xhtml_page"
281 );
282 if ($xpage_id > 0) {
283 $ilTabs->setBackTarget(
284 $lng->txt("cntr_back_to_old_editor"),
285 $ilCtrl->getLinkTarget($this, "switchToOldEditor"),
286 "_top"
287 );
288 } else {
289 $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=" . $this->object->getType() . "_" .
290 $this->object->getRefId(), "_top");
291 }
292
293 // page object
294 include_once("./Services/Container/classes/class.ilContainerPage.php");
295 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
296
297 $lng->loadLanguageModule("content");
298
299 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
300 $this->tpl->setVariable(
301 "LOCATION_CONTENT_STYLESHEET",
302 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
303 );
304 $this->tpl->setCurrentBlock("SyntaxStyle");
305 $this->tpl->setVariable(
306 "LOCATION_SYNTAX_STYLESHEET",
308 );
309 $this->tpl->parseCurrentBlock();
310
312 "cont",
313 $this->object->getId()
314 )) {
315 // doesn't exist -> create new one
316 $new_page_object = new ilContainerPage();
317 $new_page_object->setParentId($this->object->getId());
318 $new_page_object->setId($this->object->getId());
319 $new_page_object->createFromXML();
320 }
321
322 // get page object
323 $this->ctrl->setReturnByClass("ilcontainerpagegui", "edit");
324 $page_gui = new ilContainerPageGUI($this->object->getId());
325 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
327 $this->object->getStyleSheetId(),
328 $this->object->getType()
329 ));
330
331 $page_gui->setTemplateTargetVar("ADM_CONTENT");
332 $page_gui->setFileDownloadLink("");
333 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen"));
334 //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
335 $page_gui->setPresentationTitle("");
336 $page_gui->setTemplateOutput(false);
337
338 // old editor information text
340 $this->object->getId(),
341 "xhtml_page"
342 );
343 if ($xpage_id > 0) {
344 $wtpl = new ilTemplate(
345 "tpl.cntr_old_editor_message.html",
346 true,
347 true,
348 "Services/Container"
349 );
350 $wtpl->setVariable("ALT_WARNING", $lng->txt("warning"));
351 $wtpl->setVariable(
352 "IMG_WARNING",
353 ilUtil::getImagePath("icon_alert.svg")
354 );
355 $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
356 $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
357 $wtpl->setVariable(
358 "HREF_SWITCH_TO_NEW_EDITOR",
359 $ilCtrl->getLinkTarget($this, "useNewEditor")
360 );
361 $wtpl->setVariable(
362 "TXT_MIGRATION_SWITCH",
363 $lng->txt("cntr_switch_to_new_editor_cmd")
364 );
365 $page_gui->setPrependingHtml($wtpl->get());
366 }
367
368 // style tab
369 $page_gui->setTabHook($this, "addPageTabs");
370
371 $ret = $this->ctrl->forwardCommand($page_gui);
372
373 //$ret =& $page_gui->executeCommand();
374 return $ret;
375 }
Container page GUI class.
Container page object.
static getSyntaxStylePath()
get syntax style path
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $ret, $tabs, 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 223 of file class.ilContainerGUI.php.

224 {
226 $ilTabs = $this->tabs;
227
228 $ilTabs->clearTargets();
229
230 $cmd = $ilCtrl->getCmd();
231 include_once("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
232 $this->ctrl->setReturn($this, "editStyleProperties");
233 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
234 $style_gui->omitLocator();
235 if ($cmd == "create" || $_GET["new_type"]=="sty") {
236 $style_gui->setCreationMode(true);
237 }
238
239 if ($cmd == "confirmedDelete") {
240 $this->object->setStyleSheetId(0);
241 $this->object->update();
242 }
243
244 $ret = $this->ctrl->forwardCommand($style_gui);
245
246 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
247 $style_id = $ret;
248 $this->object->setStyleSheetId($style_id);
249 $this->object->update();
250 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
251 }
252 }
Class ilObjStyleSheetGUI.

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, $ret, and $tabs.

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 3208 of file class.ilContainerGUI.php.

3209 {
3211
3212 $ref_id = $_GET["cmdrefid"];
3215
3216 // this should be done via container-object->getSubItem in the future
3217 $data = array("child" => $ref_id, "ref_id" => $ref_id, "obj_id" => $obj_id,
3218 "type" => $type);
3219 include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
3221 $item_list_gui->setContainerObject($this);
3222
3223 $item_list_gui->enableComments(true);
3224 $item_list_gui->enableNotes(true);
3225 $item_list_gui->enableTags(true);
3226
3227 $this->modifyItemGUI($item_list_gui, $data, false);
3228 $html = $item_list_gui->getListItemHTML(
3229 $ref_id,
3230 $obj_id,
3231 "",
3232 "",
3233 true,
3234 true
3235 );
3236
3237 // include plugin slot for async item list
3238 $ilPluginAdmin = $this->plugin_admin;
3239 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
3240 foreach ($pl_names as $pl) {
3241 $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
3242 $gui_class = $ui_plugin->getUIClassInstance();
3243 $resp = $gui_class->getHTML("Services/Container", "async_item_list", array("html" => $html));
3244 if ($resp["mode"] != ilUIHookPluginGUI::KEEP) {
3245 $html = $gui_class->modifyHTML($html, $resp);
3246 }
3247 }
3248
3249 echo $html;
3250 exit;
3251 }
const IL_COMP_SERVICE
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify list gui for presentation in container @global type $lng.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.

References $_GET, ilObjectGUI\$ctrl, ilObjectGUI\$data, $html, $ilCtrl, ilObjectGUI\$obj_id, $plugin_admin, ilObjectGUI\$ref_id, $type, 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 395 of file class.ilContainerGUI.php.

396 {
399
400 if (!$ilSetting->get("enable_cat_page_edit")) {
401 return;
402 }
403
404 // old page editor content
406 $this->object->getId(),
407 "xhtml_page"
408 );
409 if ($xpage_id > 0) {
410 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
411 $xpage = new ilXHTMLPage($xpage_id);
412 return $xpage->getContent();
413 }
414
415
416 // page object
417
418
419 // if page does not exist, return nothing
420 include_once("./Services/COPage/classes/class.ilPageUtil.php");
422 "cont",
423 $this->object->getId()
424 )) {
425 return "";
426 }
427 include_once("./Services/Container/classes/class.ilContainerPage.php");
428 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
429
430 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
431 $this->tpl->setVariable(
432 "LOCATION_CONTENT_STYLESHEET",
433 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
434 );
435 $this->tpl->setCurrentBlock("SyntaxStyle");
436 $this->tpl->setVariable(
437 "LOCATION_SYNTAX_STYLESHEET",
439 );
440 $this->tpl->parseCurrentBlock();
441
442 // get page object
443 include_once("./Services/Object/classes/class.ilObjectTranslation.php");
444 $ot = ilObjectTranslation::getInstance($this->object->getId());
445 $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
446 $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
447 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
449 $this->object->getStyleSheetId(),
450 $this->object->getType()
451 ));
452
453 $page_gui->setPresentationTitle("");
454 $page_gui->setTemplateOutput(false);
455 $page_gui->setHeader("");
456 $ret = $page_gui->showPage();
457
458 //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
459
460 //$ret =& $page_gui->executeCommand();
461 return $ret;
462 }
static getInstance($a_obj_id)
Get instance.
static _existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
$lang
Definition: consent.php:3

References $ilSetting, $ilUser, $lang, $ret, $settings, $user, 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 539 of file class.ilContainerGUI.php.

540 {
541 $courseTimingView = -1;
542 if (defined('IL_CRS_VIEW_TIMING')) {
543 $courseTimingView = IL_CRS_VIEW_TIMING;
544 }
545
546 switch ($this->object->getViewMode()) {
547 // all items in one block
549 include_once("./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
550 $container_view = new ilContainerSimpleContentGUI($this);
551 break;
552
554 include_once('./Services/Container/classes/class.ilContainerObjectiveGUI.php');
555 $container_view = new ilContainerObjectiveGUI($this);
556 break;
557
558 // all items in one block
560 case $courseTimingView: // not nice this workaround
561 include_once("./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
562 $container_view = new ilContainerSessionsContentGUI($this);
563 break;
564
565 // all items in one block
567 default:
568 include_once("./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
569 $container_view = new ilContainerByTypeContentGUI($this);
570 break;
571 }
572
573 return $container_view;
574 }
const IL_CRS_VIEW_TIMING
GUI class for course objective view.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

References defined, IL_CRS_VIEW_TIMING, ilContainer\VIEW_BY_TYPE, 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 182 of file class.ilContainerGUI.php.

183 {
184 $values = parent::getEditFormValues();
185
186 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
187 $values['didactic_type'] =
188 'dtpl_' . ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
189
190 return $values;
191 }

References ilDidacticTemplateObjSettings\lookupTemplateId().

Referenced by ilObjFolderGUI\editObject().

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

◆ getTabs()

ilContainerGUI::getTabs ( )

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, ilObjOrgUnitGUI, ilObjRootFolderGUI, and ilObjStudyProgrammeGUI.

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

1354 {
1357
1358 // edit permissions
1359 if ($rbacsystem->checkAccess('edit_permission', $this->ref_id)) {
1360 $this->tabs_gui->addTarget(
1361 "perm_settings",
1362 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1363 array("perm","info","owner"),
1364 'ilpermissiongui'
1365 );
1366 if ($ilCtrl->getNextClass() == "ilpermissiongui") {
1367 $this->tabs_gui->activateTab("perm_settings");
1368 }
1369 }
1370
1371 // show clipboard
1372 if (strtolower($_GET["baseClass"]) == "ilrepositorygui" && !empty($_SESSION["clipboard"])) {
1373 $this->tabs_gui->addTarget(
1374 "clipboard",
1375 $this->ctrl->getLinkTarget($this, "clipboard"),
1376 "clipboard",
1377 get_class($this)
1378 );
1379 }
1380 }

References $_GET, $_SESSION, ilObjectGUI\$ctrl, $ilCtrl, and $rbacsystem.

◆ getTreeSelectorGUI()

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

Reimplemented in ilObjOrgUnitGUI.

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

3741 {
3742 include_once("./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
3743 $exp = new ilRepositorySelectorExplorerGUI($this, "showPasteTree");
3744 // TODO: The study programme 'prg' is not included here, as the
3745 // ilRepositorySelectorExplorerGUI only handles static rules for
3746 // parent-child-relations and not the dynamic relationsships
3747 // required for the SP (see #16909).
3748 $exp->setTypeWhiteList(array("root", "cat", "grp", "crs", "fold"));
3749 if ($cmd == "link") {
3750 $exp->setSelectMode("nodes", true);
3751 return $exp;
3752 } else {
3753 $exp->setSelectMode("nodes[]", false);
3754 return $exp;
3755 }
3756 }
Explorer for selecting repository items.

Referenced by showPasteTreeObject().

+ Here is the caller graph for this function:

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

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

2292 {
2294
2295 // empty session on init
2296 $_SESSION['paste_copy_repexpand'] = array();
2297
2298 // copy opend nodes from repository explorer
2299 $_SESSION['paste_copy_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2300
2301 // open current position
2302 $path = $tree->getPathId((int) $_GET['ref_id']);
2303 foreach ((array) $path as $node_id) {
2304 if (!in_array($node_id, $_SESSION['paste_copy_repexpand'])) {
2305 $_SESSION['paste_copy_repexpand'][] = $node_id;
2306 }
2307 }
2308
2309 return $this->showPasteTreeObject();
2310 }
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 2193 of file class.ilContainerGUI.php.

2194 {
2196
2197 // empty session on init
2198 $_SESSION['paste_linked_repexpand'] = array();
2199
2200 // copy opend nodes from repository explorer
2201 $_SESSION['paste_linked_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2202
2203 // open current position
2204 $path = $tree->getPathId((int) $_GET['ref_id']);
2205 foreach ((array) $path as $node_id) {
2206 if (!in_array($node_id, $_SESSION['paste_linked_repexpand'])) {
2207 $_SESSION['paste_linked_repexpand'][] = $node_id;
2208 }
2209 }
2210
2211 return $this->showPasteTreeObject();
2212 }

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 2313 of file class.ilContainerGUI.php.

2314 {
2316
2317 // empty session on init
2318 $_SESSION['paste_cut_repexpand'] = array();
2319
2320 // copy opend nodes from repository explorer
2321 $_SESSION['paste_cut_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2322
2323 // open current position
2324 $path = $tree->getPathId((int) $_GET['ref_id']);
2325 foreach ((array) $path as $node_id) {
2326 if (!in_array($node_id, $_SESSION['paste_cut_repexpand'])) {
2327 $_SESSION['paste_cut_repexpand'][] = $node_id;
2328 }
2329 }
2330
2331 return $this->showPasteTreeObject();
2332 }

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 3284 of file class.ilContainerGUI.php.

3285 {
3286 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3287 $this->form = new ilPropertyFormGUI();
3288 $this->form->setFormAction($this->ctrl->getFormAction($this));
3289
3290 // new password
3291 $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
3292 $ipass->setRequired(true);
3293
3294 $this->form->addItem($ipass);
3295 $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
3296 $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
3297
3298 $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
3299 $this->form->setFormAction($this->ctrl->getFormAction($this));
3300
3301 return $this->form;
3302 }
This class represents a password property in a property form.
This class represents a property form user interface.
if(isset($_POST['submit'])) $form

References $form.

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 3383 of file class.ilContainerGUI.php.

3384 {
3385 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3386
3387 // begin-patch fm
3388 include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
3389 if (ilFMSettings::getInstance()->isEnabled()) {
3390 if ($lg instanceof ilObjectListGUI) {
3391 $lg->addCustomCommand($this->ctrl->getLinkTarget($this, 'fileManagerLaunch'), 'fm_start', '_blank');
3392 }
3393 }
3394 // end-patch fm
3395 return $lg;
3396 }
Class ilObjectListGUI.
$lg
Definition: example_018.php:62

References $lg, and 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 3577 of file class.ilContainerGUI.php.

3582 {
3583 $position = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_position'), $a_prefix . '_new_items_position');
3584 $position->setValue($settings->getSortNewItemsPosition());
3585 $position->setRequired(true);
3586
3587 //new items insert on top
3588 $new_top = new ilRadioOption(
3589 $this->lng->txt('sorting_new_items_at_top'),
3591 );
3592
3593 $position->addOption($new_top);
3594
3595 //new items insert at bottom
3596 $new_bottom = new ilRadioOption(
3597 $this->lng->txt('sorting_new_items_at_bottom'),
3599 );
3600
3601 $position->addOption($new_bottom);
3602
3603 $element->addSubItem($position);
3604
3605 $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'), $a_prefix . '_new_items_order');
3606 $order->setValue($settings->getSortNewItemsOrder());
3607 $order->setRequired(true);
3608
3609 if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
3610 //new items sort in alphabetical order
3611 $new_title = new ilRadioOption(
3612 $this->lng->txt('sorting_title_header'),
3614 );
3615
3616 $order->addOption($new_title);
3617 }
3618
3619 if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
3620 //new items sort by creation date
3621 $new_creation = new ilRadioOption(
3622 $this->lng->txt('sorting_creation_header'),
3624 );
3625
3626 $order->addOption($new_creation);
3627 }
3628
3629
3630 if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
3631 //new items by activation
3632 $new_activation = new ilRadioOption(
3633 $this->lng->txt('crs_sort_activation'),
3635 );
3636
3637 $order->addOption($new_activation);
3638 }
3639
3640 $element->addSubItem($order);
3641
3642 $this->initSortingDirectionForm($settings, $element, 'manual');
3643
3644 return $element;
3645 }
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 $settings, 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 3542 of file class.ilContainerGUI.php.

3543 {
3544 if ($a_prefix == 'manual') {
3545 $txt = $this->lng->txt('sorting_new_items_direction');
3546 } else {
3547 $txt = $this->lng->txt('sorting_direction');
3548 }
3549
3550 $direction = new ilRadioGroupInputGUI($txt, $a_prefix . '_sorting_direction');
3551 $direction->setValue($sorting_settings->getSortDirection());
3552 $direction->setRequired(true);
3553
3554 // asc
3555 $asc = new ilRadioOption(
3556 $this->lng->txt('sorting_asc'),
3558 );
3559 $direction->addOption($asc);
3560
3561 // desc
3562 $desc = new ilRadioOption(
3563 $this->lng->txt('sorting_desc'),
3565 );
3566 $direction->addOption($desc);
3567
3568 $element->addSubItem($direction);
3569
3570 return $element;
3571 }
$txt
Definition: error.php:11

References $txt, 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 3473 of file class.ilContainerGUI.php.

3474 {
3475 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3476 include_once './Services/Container/classes/class.ilContainer.php';
3477
3478 $settings = new ilContainerSortingSettings($this->object->getId());
3479 $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
3480
3481 if (in_array(ilContainer::SORT_INHERIT, $a_sorting_settings)) {
3482 $sort_inherit = new ilRadioOption();
3483 $sort_inherit->setTitle(
3484 $this->lng->txt('sort_inherit_prefix') .
3487 $this->object->getId()
3488 )
3489 ) . ') '
3490 );
3491 $sort_inherit->setValue(ilContainer::SORT_INHERIT);
3492 $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
3493 $sort->addOption($sort_inherit);
3494 }
3495 if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
3496 $sort_title = new ilRadioOption(
3497 $this->lng->txt('sorting_title_header'),
3499 );
3500 $sort_title->setInfo($this->lng->txt('sorting_info_title'));
3501
3502 $this->initSortingDirectionForm($settings, $sort_title, 'title');
3503 $sort->addOption($sort_title);
3504 }
3505 if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
3506 $sort_activation = new ilRadioOption($this->lng->txt('sorting_creation_header'), ilContainer::SORT_CREATION);
3507 $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
3508 $this->initSortingDirectionForm($settings, $sort_activation, 'creation');
3509 $sort->addOption($sort_activation);
3510 }
3511 if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
3512 $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'), ilContainer::SORT_ACTIVATION);
3513 $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
3514 $this->initSortingDirectionForm($settings, $sort_activation, 'activation');
3515 $sort->addOption($sort_activation);
3516 }
3517 if (in_array(ilContainer::SORT_MANUAL, $a_sorting_settings)) {
3518 $sort_manual = new ilRadioOption(
3519 $this->lng->txt('sorting_manual_header'),
3521 );
3522 $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
3523 $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
3524 $sort->addOption($sort_manual);
3525 }
3526
3527 // Handle moved containers and there possibly invalid values
3528 if (in_array($settings->getSortMode(), $a_sorting_settings)) {
3529 $sort->setValue($settings->getSortMode());
3530 } else {
3531 $sort->setValue(ilContainer::SORT_TITLE);
3532 }
3533 $form->addItem($sort);
3534
3535 return $form;
3536 }
initManualSortingOptionForm(ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
Add manual sorting options.
static lookupSortModeFromParentContainer($a_obj_id)
Lookup sort mode from parent container.
static sortModeToString($a_sort_mode)
get String representation of sort mode

References $form, $settings, initManualSortingOptionForm(), initSortingDirectionForm(), ilContainerSortingSettings\lookupSortModeFromParentContainer(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, and ilContainerSortingSettings\sortModeToString().

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 3047 of file class.ilContainerGUI.php.

3048 {
3050 $lng = $this->lng;
3051 $ilTabs = $this->tabs;
3053 $tpl = $this->tpl;
3054
3055 $tpl->setTreeFlatIcon("", "");
3056 $ilTabs->clearTargets();
3058 $this->object->getId(),
3059 "xhtml_page"
3060 );
3061 if ($xpage_id > 0) {
3062 $ilTabs->setBackTarget(
3063 $lng->txt("cntr_back_to_old_editor"),
3064 $ilCtrl->getLinkTarget($this, "switchToOldEditor"),
3065 "_top"
3066 );
3067 } else {
3068 $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=" . $this->object->getType() . "_" .
3069 $this->object->getRefId(), "_top");
3070 }
3071
3072 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
3073 $page_gui = new ilContainerPageGUI($this->object->getId());
3074 $style_id = $this->object->getStyleSheetId();
3075 if (ilObject::_lookupType($style_id) == "sty") {
3076 $page_gui->setStyleId($style_id);
3077 } else {
3078 $style_id = 0;
3079 }
3080 $page_gui->setTabHook($this, "addPageTabs");
3081 $ilCtrl->getHTML($page_gui);
3082 $ilTabs->setTabActive("obj_sty");
3083
3084 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3085 $lng->loadLanguageModule("style");
3086
3087 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
3088 $this->form = new ilPropertyFormGUI();
3089
3090 $fixed_style = $ilSetting->get("fixed_content_style_id");
3091 // $style_id = $this->object->getStyleSheetId();
3092
3093 if ($fixed_style > 0) {
3094 $st = new ilNonEditableValueGUI($lng->txt("wiki_current_style"));
3095 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
3096 $this->lng->txt("global_fixed") . ")");
3097 $this->form->addItem($st);
3098 } else {
3100 true,
3101 false,
3102 $_GET["ref_id"]
3103 );
3104
3105 $st_styles[0] = $this->lng->txt("default");
3106 ksort($st_styles);
3107
3108 if ($style_id > 0) {
3109 // individual style
3110 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
3111 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
3112 $st->setValue(ilObject::_lookupTitle($style_id));
3113 $this->form->addItem($st);
3114
3115 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
3116
3117 // delete command
3118 $this->form->addCommandButton(
3119 "editStyle",
3120 $lng->txt("style_edit_style")
3121 );
3122 $this->form->addCommandButton(
3123 "deleteStyle",
3124 $lng->txt("style_delete_style")
3125 );
3126 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
3127 }
3128 }
3129
3130 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
3131 $style_sel = ilUtil::formSelect(
3132 $style_id,
3133 "style_id",
3134 $st_styles,
3135 false,
3136 true
3137 );
3138 $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
3139 $style_sel->setOptions($st_styles);
3140 $style_sel->setValue($style_id);
3141 $this->form->addItem($style_sel);
3142 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
3143 $this->form->addCommandButton(
3144 "saveStyleSettings",
3145 $lng->txt("save")
3146 );
3147 $this->form->addCommandButton(
3148 "createStyle",
3149 $lng->txt("sty_create_ind_style")
3150 );
3151 }
3152 }
3153 $this->form->setTitle($lng->txt("obj_sty"));
3154 $this->form->setFormAction($ilCtrl->getFormAction($this));
3155 }
This class represents a non editable value in a property form.
static _lookupStandard($a_id)
Lookup standard flag.
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
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, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$lng, $settings, $tabs, 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 ( )

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

2663 {
2664 $ilAccess = $this->access;
2665
2666 // #10081
2667 if ($_SESSION["il_cont_admin_panel"] &&
2668 $this->object->getRefId() &&
2669 !$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
2670 return false;
2671 }
2672
2673 return $_SESSION["il_cont_admin_panel"];
2674 }

References $_SESSION, and $access.

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 1432 of file class.ilContainerGUI.php.

1433 {
1434 if ($this->isActiveOrdering()) {
1436 }
1437 return false;
1438 }
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 1423 of file class.ilContainerGUI.php.

1424 {
1425 return $this->edit_order ? true : false;
1426 }

Referenced by isActiveItemOrdering(), and showAdministrationPanel().

+ Here is the caller graph for this function:

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

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

1486 {
1488 }

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 2284 of file class.ilContainerGUI.php.

2285 {
2286 ilUtil::sendSuccess($this->lng->txt("obj_inserted_clipboard"), true);
2287 $GLOBALS['ilCtrl']->returnToParent($this);
2288 }

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 1834 of file class.ilContainerGUI.php.

1835 {
1839
1840 $no_cut = [];
1841 $no_link = [];
1842
1843 if ($_GET["item_ref_id"] != "") {
1844 $_POST["id"] = array($_GET["item_ref_id"]);
1845 }
1846
1847 if (!isset($_POST["id"])) {
1848 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1849 }
1850
1851 // CHECK ACCESS
1852 foreach ($_POST["id"] as $ref_id) {
1853 if (!$rbacsystem->checkAccess('delete', $ref_id)) {
1854 $no_cut[] = $ref_id;
1855 }
1856
1858
1859 if (!$this->objDefinition->allowLink($object->getType())) {
1860 $no_link[] = $object->getType();
1861 }
1862 }
1863
1864 // NO ACCESS
1865 if (count($no_cut)) {
1866 $ilErr->raiseError($this->lng->txt("msg_no_perm_link") . " " .
1867 implode(',', $no_cut), $ilErr->MESSAGE);
1868 }
1869
1870 if (count($no_link)) {
1871 //#12203
1872 $ilErr->raiseError($this->lng->txt("msg_obj_no_link"), $ilErr->MESSAGE);
1873 }
1874
1875 // WRITE TO CLIPBOARD
1876 $clipboard["parent"] = $_GET["ref_id"];
1877 $clipboard["cmd"] = $ilCtrl->getCmd();
1878
1879 foreach ($_POST["id"] as $ref_id) {
1880 $clipboard["ref_ids"][] = $ref_id;
1881 }
1882
1883 $_SESSION["clipboard"] = $clipboard;
1884
1885 $suffix = 'p';
1886 if (count($clipboard["ref_ids"]) == 1) {
1887 $suffix = 's';
1888 }
1889 ilUtil::sendInfo($this->lng->txt("msg_link_clipboard_" . $suffix), true);
1890
1892 } // END LINK

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$object, $rbacsystem, ilObjectGUI\$ref_id, ilObjectFactory\getInstanceByRefId(), initAndDisplayLinkIntoMultipleObjectsObject(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ lockObject()

ilContainerGUI::lockObject ( )

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

1492 {
1496
1497 if (!$rbacsystem->checkAccess("write", $_GET['item_ref_id'])) {
1498 $this->ilErr->raiseError($this->lng->txt('err_no_permission'), $this->ilErr->MESSAGE);
1499 }
1500
1501
1502 require_once('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1504 require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
1506 require_once 'Services/WebDAV/classes/class.ilDAVLocks.php';
1507 $locks = new ilDAVLocks();
1508
1509 $result = $locks->lockRef(
1510 $_GET['item_ref_id'],
1511 $ilUser->getId(),
1512 $ilUser->getLogin(),
1513 'ref_' . $_GET['item_ref_id'] . '_usr_' . $ilUser->getId(),
1514 time() + /*30*24*60**/60,
1515 0,
1516 'exclusive'
1517 );
1518
1520 $this->lng->txt(
1521 ($result === true) ? 'object_locked' : $result
1522 ),
1523 true
1524 );
1525 }
1526 }
1527 $this->renderObject();
1528 }
static _isActionsVisible()
Static getter.

References $_GET, $ilUser, $rbacsystem, $result, ilObjectGUI\$tree, $user, ilDAVServer\_isActionsVisible(), ilDAVActivationChecker\_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 list gui for presentation in container @global type $lng.

Parameters
type$a_item_list_gui
type$a_item_data
type$a_show_path

Reimplemented in ilObjCourseGUI, ilObjFolderGUI, and ilObjGroupGUI.

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

2990 {
2991 $lng = $this->lng;
2992
2993 if ($a_show_path) {
2994 $a_item_list_gui->addCustomProperty(
2995 $lng->txt('path'),
2996 ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
2997 false,
2998 true
2999 );
3000 }
3001 }

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 1122 of file class.ilContainerGUI.php.

1123 {
1124 $tpl = new ilTemplate(
1125 "tpl.container_list_block.html",
1126 true,
1127 true,
1128 "Services/Container"
1129 );
1130 $this->cur_row_type = "row_type_1";
1131 return $tpl;
1132 }

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 2341 of file class.ilContainerGUI.php.

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

References $_GET, $_SESSION, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, $ilLog, $ilUser, $key, $log, $message, $rbacadmin, $rbacsystem, ilObjectGUI\$ref_id, ilObjectGUI\$tree, $user, ilConditionHandler\_adjustMovedObjectConditions(), ilChangeEvent\_catchupWriteEvents(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChangeEvent\_recordWriteEvent(), clearObject(), ilObjectFactory\getInstanceByRefId(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ performPasteIntoMultipleObjectsObject()

ilContainerGUI::performPasteIntoMultipleObjectsObject ( )

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

1916 {
1922 $ilObjDataCache = $this->obj_data_cache;
1925
1926 $exists = [];
1927 $is_child = [];
1928 $not_allowed_subobject = [];
1929 $no_paste = [];
1930
1931 $command = $_SESSION['clipboard']['cmd'];
1932 if (!in_array($command, array('cut', 'link', 'copy'))) {
1933 $message = __METHOD__ . ": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1934 $ilErr->raiseError($message, $ilErr->WARNING);
1935 }
1936
1937 if ($command == 'cut') {
1938 if (isset($_POST['node']) && (int) $_POST['node']) {
1939 $_POST['nodes'] = array($_POST['node']);
1940 }
1941 }
1942
1943 if (!is_array($_POST['nodes']) || !count($_POST['nodes'])) {
1944 ilUtil::sendFailure($this->lng->txt('select_at_least_one_object'));
1945 switch ($command) {
1946 case 'cut':
1947 $this->showPasteTreeObject();
1948 break;
1949 case 'copy':
1950 $this->showPasteTreeObject();
1951 break;
1952 case 'link':
1953 $this->showPasteTreeObject();
1954 break;
1955 }
1956 return;
1957 }
1958
1959 // this loop does all checks
1960 $folder_objects_cache = array();
1961 foreach ($_SESSION['clipboard']['ref_ids'] as $ref_id) {
1963 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1964
1965 foreach ($_POST['nodes'] as $folder_ref_id) {
1966 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1967 $folder_objects_cache[$folder_ref_id] = ilObjectFactory::getInstanceByRefId($folder_ref_id);
1968 }
1969
1970 // CHECK ACCESS
1971 if (!$rbacsystem->checkAccess('create', $folder_ref_id, $obj_data->getType())) {
1972 $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() . ']');
1973 }
1974
1975 // CHECK IF REFERENCE ALREADY EXISTS
1976 if ($folder_ref_id == $current_parent_id) {
1977 $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() . ']');
1978 }
1979
1980 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
1981 if ($tree->isGrandChild($ref_id, $folder_ref_id) ||
1982 $ref_id == $folder_ref_id) {
1983 $is_child[] = sprintf($this->lng->txt('msg_paste_object_not_in_itself'), $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']');
1984 }
1985
1986 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
1987 if (!in_array($obj_data->getType(), array_keys($folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()))) {
1988 $not_allowed_subobject[] = sprintf(
1989 $this->lng->txt('msg_obj_may_not_contain_objects_of_type'),
1990 $folder_objects_cache[$folder_ref_id]->getTitle() . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']',
1991 $GLOBALS['lng']->txt('obj_' . $obj_data->getType())
1992 );
1993 }
1994 }
1995 }
1996
1998 // process checking results
1999 if (count($exists) && $command != "copy") {
2000 $error .= implode('<br />', $exists);
2001 }
2002
2003 if (count($is_child)) {
2004 $error .= $error != '' ? '<br />' : '';
2005 $error .= implode('<br />', $is_child);
2006 }
2007
2008 if (count($not_allowed_subobject)) {
2009 $error .= $error != '' ? '<br />' : '';
2010 $error .= implode('<br />', $not_allowed_subobject);
2011 }
2012
2013 if (count($no_paste)) {
2014 $error .= $error != '' ? '<br />' : '';
2015 $error .= implode('<br />', $no_paste);
2016 }
2017
2018 if ($error != '') {
2020 switch ($command) {
2021 case 'cut':
2022 $this->showPasteTreeObject();
2023 break;
2024 case 'copy':
2025 $this->showPasteTreeObject();
2026 break;
2027 case 'link':
2028 $this->showPasteTreeObject();
2029 break;
2030 }
2031 return;
2032 }
2033
2034 // log pasteObject call
2035 $ilLog->write(__METHOD__ . ", cmd: " . $command);
2036
2038 // everything ok: now paste the objects to new location
2039
2040 // to prevent multiple actions via back/reload button
2041 $ref_ids = $_SESSION['clipboard']['ref_ids'];
2042 unset($_SESSION['clipboard']['ref_ids']);
2043
2044 // BEGIN ChangeEvent: Record paste event.
2045 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
2046 // END ChangeEvent: Record paste event.
2047
2048 // process COPY command
2049 if ($command == 'copy') {
2050 foreach ($_POST['nodes'] as $folder_ref_id) {
2051 foreach ($ref_ids as $ref_id) {
2052 $revIdMapping = array();
2053
2054 $oldNode_data = $tree->getNodeData($ref_id);
2055 if ($oldNode_data['parent'] == $folder_ref_id) {
2056 require_once 'Modules/File/classes/class.ilObjFileAccess.php';
2057 $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'], null);
2058 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
2059 } else {
2060 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, null);
2061 }
2062
2063 // BEGIN ChangeEvent: Record copy event.
2064 $old_parent_data = $tree->getParentNodeData($ref_id);
2065 $newNode_data = $tree->getNodeData($newRef);
2067 $oldNode_data['type'],
2068 $ref_id,
2069 $oldNode_data['obj_id'],
2070 $ilUser->getId()
2071 );
2073 $newNode_data['obj_id'],
2074 $ilUser->getId(),
2075 'add',
2076 $ilObjDataCache->lookupObjId($folder_ref_id)
2077 );
2078 ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
2079 // END PATCH ChangeEvent: Record cut event.
2080 }
2081 }
2082
2083 ilUtil::sendSuccess($this->lng->txt('msg_cloned'), true);
2084 } // END COPY
2085
2086 // process CUT command
2087 if ($command == 'cut') {
2088 foreach ($_POST['nodes'] as $folder_ref_id) {
2089 foreach ($ref_ids as $ref_id) {
2090 // Store old parent
2091 $old_parent = $tree->getParentId($ref_id);
2092 $tree->moveTree($ref_id, $folder_ref_id);
2093 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
2094
2095 include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
2097
2098 // BEGIN ChangeEvent: Record cut event.
2099 $node_data = $tree->getNodeData($ref_id);
2100 $old_parent_data = $tree->getNodeData($old_parent);
2102 $node_data['obj_id'],
2103 $ilUser->getId(),
2104 'remove',
2105 $old_parent_data['obj_id']
2106 );
2108 $node_data['obj_id'],
2109 $ilUser->getId(),
2110 'add',
2111 $ilObjDataCache->lookupObjId($folder_ref_id)
2112 );
2113 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2114 // END PATCH ChangeEvent: Record cut event.
2115 }
2116
2117 // prevent multiple iterations for cut cmommand
2118 break;
2119 }
2120
2121 ilUtil::sendSuccess($this->lng->txt('msg_cut_copied'), true);
2122 } // END CUT
2123
2124 // process LINK command
2125 if ($command == 'link') {
2126 $linked_to_folders = array();
2127
2128 include_once "Services/AccessControl/classes/class.ilRbacLog.php";
2129 $rbac_log_active = ilRbacLog::isActive();
2130
2131 foreach ($_POST['nodes'] as $folder_ref_id) {
2132 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
2133
2134 foreach ($ref_ids as $ref_id) {
2135 // get node data
2136 $top_node = $tree->getNodeData($ref_id);
2137
2138 // get subnodes of top nodes
2139 $subnodes[$ref_id] = $tree->getSubtree($top_node);
2140 }
2141
2142 // now move all subtrees to new location
2143 foreach ($subnodes as $key => $subnode) {
2144 // first paste top_node....
2146 $new_ref_id = $obj_data->createReference();
2147 $obj_data->putInTree($folder_ref_id);
2148 $obj_data->setPermissions($folder_ref_id);
2149
2150 // rbac log
2151 if ($rbac_log_active) {
2152 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
2153 $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
2154 ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, $key);
2155 }
2156
2157 // BEGIN ChangeEvent: Record link event.
2158 $node_data = $tree->getNodeData($new_ref_id);
2160 $node_data['obj_id'],
2161 $ilUser->getId(),
2162 'add',
2163 $ilObjDataCache->lookupObjId($folder_ref_id)
2164 );
2165 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2166 // END PATCH ChangeEvent: Record link event.
2167 }
2168
2169 $ilLog->write(__METHOD__ . ', link finished');
2170 }
2171
2172 $linked_targets = array();
2173 if (count($linked_to_folders)) {
2174 require_once 'Services/Link/classes/class.ilLink.php';
2175 foreach ($linked_to_folders as $ref_id => $title) {
2176 $linked_targets[] = '<a href="' . ilLink::_getLink($ref_id) . '">' . $title . '</a>';
2177 }
2178 }
2179
2180 $suffix = 'p';
2181 if (count($ref_ids) == 1) {
2182 $suffix = 's';
2183 }
2184 ilUtil::sendSuccess(sprintf($this->lng->txt('mgs_objects_linked_to_the_following_folders_' . $suffix), implode(', ', $linked_targets)), true);
2185 } // END LINK
2186
2187 // clear clipboard
2188 $this->clearObject();
2189
2190 $this->ctrl->returnToParent($this);
2191 }
static _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, $error, $GLOBALS, ilObjectGUI\$ilErr, $ilLog, $ilUser, $key, $log, $message, $obj_data_cache, $rbacadmin, $rbacreview, $rbacsystem, ilObjectGUI\$ref_id, $title, ilObjectGUI\$tree, $user, 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(), showPasteTreeObject(), and sprintf.

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

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCourseGUI, and ilObjGroupGUI.

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

468 {
469 if (parent::prepareOutput($a_show_subobjects)) { // return false in admin mode
470 if ($this->getCreationMode() != true && $a_show_subobjects) {
471 // This method is called directly from ilContainerGUI::renderObject
472 #$this->showPossibleSubObjects();
473 $this->showTreeFlatIcon();
474
475 // Member view
476 include_once './Services/Container/classes/class.ilMemberViewGUI.php';
477 ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
478 }
479 }
480 }
static showMemberViewSwitch($a_ref_id)
Show member view switch.
getCreationMode()
get creation mode

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

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

+ Here is the call graph for this function:
+ Here is the caller 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 1784 of file class.ilContainerGUI.php.

1785 {
1786 global $DIC;
1787
1788 $rbacsystem = $DIC->rbac()->system();
1789 $tree = $DIC->repositoryTree();
1790 $ilAccess = $DIC->access();
1791
1792 $tmpdir = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1793 ilUtil::makeDir($tmpdir);
1794
1795 $subtree = $tree->getChildsByTypeFilter($refid, array("fold","file"));
1796
1797 foreach ($subtree as $child) {
1798 if (!$ilAccess->checkAccess("read", "", $child["ref_id"])) {
1799 continue;
1800 }
1801
1802 if (ilObject::_isInTrash($child["ref_id"])) {
1803 continue;
1804 }
1805
1806 if ($child["type"] == "fold") {
1807 self::recurseFolder($child["ref_id"], $child["title"], $tmpdir);
1808 } else {
1809 self::copyFile($child["obj_id"], $child["title"], $tmpdir);
1810 }
1811 }
1812 }

References $DIC, $rbacsystem, $title, 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 3329 of file class.ilContainerGUI.php.

3330 {
3331 $tpl = $this->tpl;
3332
3333 $html = null;
3334
3335 $item_data = $this->object->getSubItems(false, false, (int) $_GET["child_ref_id"]);
3336 $container_view = $this->getContentGUI();
3337
3338 // list item is session material (not part of "_all"-items - see below)
3339 include_once './Modules/Session/classes/class.ilEventItems.php';
3340 $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
3341 if (in_array((int) $_GET["child_ref_id"], $event_items)) {
3342 include_once('./Services/Object/classes/class.ilObjectActivation.php');
3343 foreach ($this->object->items["sess"] as $id) {
3344 $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
3345 foreach ($items as $event_item) {
3346 if ($event_item["child"] == (int) $_GET["child_ref_id"]) {
3347 // sessions
3348 if ((int) $_GET["parent_ref_id"]) {
3349 $event_item["parent"] = (int) $_GET["parent_ref_id"];
3350 }
3351 $html = $container_view->renderItem($event_item);
3352 }
3353 }
3354 }
3355 }
3356
3357 // "normal" list item
3358 if (!$html) {
3359 foreach ($this->object->items["_all"] as $id) {
3360 if ($id["child"] == (int) $_GET["child_ref_id"]) {
3361 $html = $container_view->renderItem($id);
3362 }
3363 }
3364 }
3365
3366 if ($html) {
3367 echo $html;
3368
3369 // we need to add onload code manually (rating, comments, etc.)
3370 echo $tpl->getOnLoadCodeForAsynch();
3371 }
3372
3373 exit;
3374 }
getContentGUI()
Get content gui object.
static _getItemsOfContainer($a_ref_id)
static getItemsByEvent($a_event_id)
Get session material / event items.
if(!array_key_exists('StateId', $_REQUEST)) $id

References $_GET, $html, $id, 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 1461 of file class.ilContainerGUI.php.

1462 {
1464 $lng = $this->lng;
1465
1466 if ((int) $ilSetting->get('disable_my_offers')) {
1467 return $this->renderObject();
1468 }
1469
1470 include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1472 ilUtil::sendSuccess($lng->txt("removed_from_desktop"));
1473 $this->renderObject();
1474 }
static removeFromDesktop()
Remove item from personal desktop @access public.

References $ilSetting, ilObjectGUI\$lng, $settings, 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 3696 of file class.ilContainerGUI.php.

3697 {
3699 $ilAppEventHandler = $this->app_event_handler;
3700 $lng = $this->lng;
3701
3702 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3703 $ru = new ilRepUtilGUI($this);
3704 $ru->removeObjectsFromSystem($_POST["trash_id"]);
3705 $this->ctrl->redirect($this, "trash");
3706 }

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

◆ renderObject()

ilContainerGUI::renderObject ( )

render the object

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

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

582 {
585 $ilTabs = $this->tabs;
588
589 $container_view = $this->getContentGUI();
590
591 $this->setContentSubTabs();
592 if ($this->isActiveAdministrationPanel()) {
593 $ilTabs->activateSubTab("manage");
594 } else {
595 $ilTabs->activateSubTab("view_content");
596 }
597
598 $container_view->setOutput();
599
600 $this->adminCommands = $container_view->adminCommands;
601
602 // it is important not to show the subobjects/admin panel here, since
603 // we will create nested forms in case, e.g. a news/calendar item is added
604 if ($ilCtrl->getNextClass() != "ilcolumngui") {
606 $this->showPossibleSubObjects();
607 }
608
609 $this->showPermanentLink($tpl);
610
611 // add tree updater javascript
612 if ((int) $_GET["ref_id"] > 1 && $ilSetting->get("rep_tree_synchronize")) {
613 $ilCtrl->setParameter($this, "active_node", (int) $_GET["ref_id"]);
614 /*$tpl->addOnloadCode("
615 if (parent && parent.tree && parent.tree.updater)
616 {
617 parent.tree.updater('tree_div', '".
618 $ilCtrl->getLinkTarget($this, "showTree", "", true, false)
619 ."');
620 }");*/
621 }
622 }
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, ilObjectGUI\$ctrl, $db, $ilCtrl, $ilDB, $ilSetting, $settings, $tabs, ilObjectGUI\$tpl, getContentGUI(), isActiveAdministrationPanel(), setContentSubTabs(), showAdministrationPanel(), showPermanentLink(), and showPossibleSubObjects().

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

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

◆ resetRowType()

ilContainerGUI::resetRowType ( )

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

1252 {
1253 $this->cur_row_type = "";
1254 }

◆ savePageContentObject()

ilContainerGUI::savePageContentObject ( )

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

988 {
989 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
990 include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
992 $this->object->getId(),
993 "xhtml_page"
994 );
995
996 /*include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
997 include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
998 $ta = new ilTextAreaInputGUI();
999 $ta->setRteTagSet("extended_table_img");
1000 $tags = $ta->getRteTagString();*/
1001
1002 //$text = ilUtil::stripSlashes($_POST["page_content"],
1003 // true,
1004 // $tags);
1005
1007 $_POST["page_content"],
1008 true,
1010 );
1011 if ($xpage_id > 0) {
1012 $xpage = new ilXHTMLPage($xpage_id);
1013 $xpage->setContent($text);
1014 $xpage->save();
1015 } else {
1016 $xpage = new ilXHTMLPage();
1017 $xpage->setContent($text);
1018 $xpage->save();
1020 $this->object->getId(),
1021 "xhtml_page",
1022 $xpage->getId()
1023 );
1024 }
1025
1026 include_once("Services/RTE/classes/class.ilRTE.php");
1028 $text,
1029 $this->object->getType() . ":html",
1030 $this->object->getId()
1031 );
1032
1033 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1034 $this->ctrl->redirect($this, "");
1035 }
static _writeContainerSetting($a_id, $a_keyword, $a_value)
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
static _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
$text
Definition: errorreport.php:18

References $_POST, $text, 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 3308 of file class.ilContainerGUI.php.

3309 {
3311
3313 if ($form->checkInput()) {
3314 $ilUser->resetPassword($this->form->getInput('new_password'), $this->form->getInput('new_password'));
3315 ilUtil::sendSuccess($this->lng->txt('webdav_pwd_instruction_success'), true);
3316 $this->showPasswordInstructionObject(false);
3317 return true;
3318 }
3319 $form->setValuesByPost();
3321 }
initFormPasswordInstruction()
Init password form.
showPasswordInstructionObject($a_init=true)
Show webdav password instruction.

References $form, $ilUser, $user, 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 2918 of file class.ilContainerGUI.php.

2919 {
2920 include_once('Services/Container/classes/class.ilContainerSorting.php');
2921 $sorting = ilContainerSorting::_getInstance($this->object->getId());
2922
2923 // Allow comma
2924 $positions = str_replace(',', '.', $_POST['position']);
2925
2926 $sorting->savePost($positions);
2927 ilUtil::sendSuccess($this->lng->txt('cntr_saved_sorting'), true);
2928 $this->ctrl->redirect($this, "editOrder");
2929 }
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 3651 of file class.ilContainerGUI.php.

3652 {
3653 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3654 $settings = new ilContainerSortingSettings($this->object->getId());
3655 $settings->setSortMode($form->getInput("sorting"));
3656
3657 switch ($form->getInput('sorting')) {
3659 $settings->setSortDirection($form->getInput('title_sorting_direction'));
3660 break;
3662 $settings->setSortDirection($form->getInput('activation_sorting_direction'));
3663 break;
3665 $settings->setSortDirection($form->getInput('creation_sorting_direction'));
3666 break;
3668 $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
3669 $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
3670 $settings->setSortDirection($form->getInput('manual_sorting_direction'));
3671 break;
3672 }
3673
3674 $settings->update();
3675 }

References $form, $settings, 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 caller graph for this function:

◆ saveStyleSettingsObject()

ilContainerGUI::saveStyleSettingsObject ( )

Save style settings.

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

3191 {
3193
3194 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3195 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
3196 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
3197 || $this->object->getStyleSheetId() == 0)) {
3198 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
3199 $this->object->update();
3200 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
3201 }
3202 $this->ctrl->redirect($this, "editStyleProperties");
3203 }

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

+ Here is the call graph for this function:

◆ setColumnSettings()

ilContainerGUI::setColumnSettings ( ilColumnGUI  $column_gui)

May be overwritten in subclasses.

Reimplemented from ilObjectGUI.

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

2680 {
2681 $ilAccess = $this->access;
2682 parent::setColumnSettings($column_gui);
2683
2684 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
2685 $this->isActiveAdministrationPanel() &&
2686 $this->allowBlocksMoving()) {
2687 $column_gui->setEnableMovement(true);
2688 }
2689
2690 $column_gui->setRepositoryItems(
2691 $this->object->getSubItems($this->isActiveAdministrationPanel(), true)
2692 );
2693
2694 //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
2695 // && $this->allowBlocksConfigure())
2696 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
2697 $column_gui->setBlockProperty("news", "settings", true);
2698 //$column_gui->setBlockProperty("news", "public_notifications_option", true);
2699 $column_gui->setBlockProperty("news", "default_visibility_option", true);
2700 $column_gui->setBlockProperty("news", "hide_news_block_option", true);
2701 }
2702
2703 if ($this->isActiveAdministrationPanel()) {
2704 $column_gui->setAdminCommands(true);
2705 }
2706 }
setBlockProperty($a_block_type, $a_property, $a_value)
This function is supposed to be used for block type specific properties, that should be passed to ilB...
setEnableMovement($a_enablemovement)
Set Enable Movement.
setRepositoryItems($a_repositoryitems)
Set Repository Items.
setAdminCommands($a_admincommands)
Set Administration Commmands.

References $access, isActiveAdministrationPanel(), ilColumnGUI\setAdminCommands(), ilColumnGUI\setBlockProperty(), ilColumnGUI\setEnableMovement(), and ilColumnGUI\setRepositoryItems().

+ Here is the call graph for this function:

◆ setContentSubTabs()

ilContainerGUI::setContentSubTabs ( )

Set content sub tabs.

Reimplemented in ilObjCourseGUI, ilObjOrgUnitGUI, and ilObjStudyProgrammeGUI.

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

628 {
630 }
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 1260 of file class.ilContainerGUI.php.

1261 {
1262 $lng = $this->lng;
1263
1264 if (!$this->isActiveAdministrationPanel()
1265 || strtolower($this->ctrl->getCmdClass()) != "ilcontainerpagegui") {
1266 return;
1267 }
1268
1269 $lng->loadLanguageModule("content");
1270 //$tabs_gui = new ilTabsGUI();
1271 //$tabs_gui->setSubTabs();
1272
1273 // back to upper context
1274 $this->tabs_gui->setBackTarget(
1275 $this->lng->txt("obj_cat"),
1276 $this->ctrl->getLinkTarget($this, "frameset"),
1277 ilFrameTargetInfo::_getFrame("MainContent")
1278 );
1279
1280 $this->tabs_gui->addTarget("edit", $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "view"), array("", "view"), "ilcontainerpagegui");
1281
1282 //$this->tpl->setTabs($tabs_gui->getHTML());
1283 }

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

+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilContainerGUI::setSideColumnReturn ( )

Set return point for side column actions.

Reimplemented in ilObjCourseGUI, and ilObjGroupGUI.

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

3762 {
3763 $this->ctrl->setReturn($this, "");
3764 }

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjOrgUnitGUI, and ilObjRootFolderGUI.

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

507 {
508 if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
509 $this->tpl->setTitle($this->object->getTitle());
510 $this->tpl->setDescription($this->object->getLongDescription());
511
512 // set tile icon
513 $icon = ilObject::_getIcon($this->object->getId(), "big", $this->object->getType());
514 $this->tpl->setTitleIcon($icon, $this->lng->txt("obj_" . $this->object->getType()));
515
516 include_once './Services/Object/classes/class.ilObjectListGUIFactory.php';
517 $lgui = ilObjectListGUIFactory::_getListGUIByType($this->object->getType());
518 $lgui->initItem($this->object->getRefId(), $this->object->getId());
519 $this->tpl->setAlertProperties($lgui->getAlertProperties());
520 }
521 }
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.

References ilObject\_getIcon(), ilObjectListGUIFactory\_getListGUIByType(), and ilContainer\_lookupContainerSetting().

+ Here is the call graph for this function:

◆ showAdministrationPanel()

ilContainerGUI::showAdministrationPanel ( $tpl)

show administration panel

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

636 {
637 $ilAccess = $this->access;
639
640 $lng->loadLanguageModule('cntr');
641
642 if ($_SESSION["clipboard"]) {
643 // #11545
644 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
645
646 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
647 $toolbar = new ilToolbarGUI();
648 $this->ctrl->setParameter($this, "type", "");
649 $this->ctrl->setParameter($this, "item_ref_id", "");
650
651 $toolbar->addFormButton(
652 $this->lng->txt('paste_clipboard_items'),
653 'paste'
654 );
655
656 $toolbar->addFormButton(
657 $this->lng->txt('clear_clipboard'),
658 'clear'
659 );
660
661 $GLOBALS['tpl']->addAdminPanelToolbar($toolbar, true, false);
662 } elseif ($this->isActiveAdministrationPanel()) {
663 // #11545
664 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
665
666 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
667 $toolbar = new ilToolbarGUI();
668 $this->ctrl->setParameter($this, "type", "");
669 $this->ctrl->setParameter($this, "item_ref_id", "");
670
671 // if (!$_SESSION["clipboard"])
672 // {
673 if ($this->object->gotItems()) {
674 $toolbar->setLeadingImage(
675 ilUtil::getImagePath("arrow_upright.svg"),
676 $lng->txt("actions")
677 );
678 $toolbar->addFormButton(
679 $this->lng->txt('delete_selected_items'),
680 'delete'
681 );
682 $toolbar->addFormButton(
683 $this->lng->txt('move_selected_items'),
684 'cut'
685 );
686 $toolbar->addFormButton(
687 $this->lng->txt('copy_selected_items'),
688 'copy'
689 );
690 $toolbar->addFormButton(
691 $this->lng->txt('link_selected_items'),
692 'link'
693 );
694 // add download button if multi download enabled
695 $folder_set = new ilSetting("fold");
696 if ($folder_set->get("enable_multi_download") == true) {
697 $toolbar->addSeparator();
698
699 if (!$folder_set->get("bgtask_download", 0)) {
700 $toolbar->addFormButton(
701 $this->lng->txt('download_selected_items'),
702 'download'
703 );
704 } else {
705 $url = $this->ctrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjfoldergui", "ilbackgroundtaskhub"), "", "", true, false);
706 $GLOBALS['tpl']->addJavaScript("Services/BackgroundTask/js/BgTask.js");
707 $GLOBALS['tpl']->addOnLoadCode("il.BgTask.initMultiForm('ilFolderDownloadBackgroundTaskHandler');");
708 $GLOBALS['tpl']->addOnLoadCode('il.BgTask.setAjax("' . $url . '");');
709
710 include_once "Services/UIComponent/Button/classes/class.ilSubmitButton.php";
711 $button = ilSubmitButton::getInstance();
712 $button->setCaption("download_selected_items");
713 $button->addCSSClass("ilbgtasksubmit");
714 $button->setCommand("download");
715 $toolbar->addButtonInstance($button);
716 }
717 }
718 }
719 if ($this->object->getType() == 'crs' or $this->object->getType() == 'grp') {
720 if ($this->object->gotItems()) {
721 $toolbar->addSeparator();
722 }
723
724 $toolbar->addButton(
725 $this->lng->txt('cntr_adopt_content'),
726 $this->ctrl->getLinkTargetByClass(
727 'ilObjectCopyGUI',
728 'adoptContent'
729 )
730 );
731 }
732 // }
733 /*else
734 {
735
736 if ($this->isMultiDownloadEnabled())
737 {
738 $toolbar->addSeparator();
739 $toolbar->addFormButton(
740 $this->lng->txt('download_selected_items'),
741 'download'
742 );
743 }
744 }*/
745
746 $GLOBALS['tpl']->addAdminPanelToolbar(
747 $toolbar,
748 ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false,
749 ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false
750 );
751
752 // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
753 if ($this->object->gotItems()) {
754 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
755 }
756 } else {
757 if ($this->edit_order) {
758 if ($this->object->gotItems() and $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
759 include_once('./Services/Container/classes/class.ilContainer.php');
760
761 if ($this->isActiveOrdering()) {
762 // #11843
763 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
764
765 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
766 $toolbar = new ilToolbarGUI();
767 $this->ctrl->setParameter($this, "type", "");
768 $this->ctrl->setParameter($this, "item_ref_id", "");
769
770 $toolbar->addFormButton(
771 $this->lng->txt('sorting_save'),
772 'saveSorting'
773 );
774
775 $GLOBALS['tpl']->addAdminPanelToolbar($toolbar, true, false);
776
777 /*
778 $GLOBALS["tpl"]->addAdminPanelCommand("saveSorting",
779 $this->lng->txt('sorting_save'));
780
781 // button should appear at bottom, too
782 $GLOBALS["tpl"]->admin_panel_bottom = true;
783 */
784 }
785 }
786 }
787 // bugfix mantis 24559
788 // undoing an erroneous change inside mantis 23516 by adding "Download Multiple Objects"-functionality for non-admins
789 // as they don't have the possibility to use the multi-download-capability of the manage-tab
790 elseif ($this->isMultiDownloadEnabled()) {
791 // bugfix mantis 0021272
792 $ref_id = $_GET['ref_id'];
793 $num_files = $this->tree->getChildsByType($ref_id, "file");
794 $num_folders = $this->tree->getChildsByType($ref_id, "fold");
795 if (count($num_files) > 0 or count($num_folders) > 0) {
796 // #11843
797 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
798
799 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
800 $toolbar = new ilToolbarGUI();
801 $this->ctrl->setParameter($this, "type", "");
802 $this->ctrl->setParameter($this, "item_ref_id", "");
803
804 $toolbar->addFormButton(
805 $this->lng->txt('download_selected_items'),
806 'download'
807 );
808
809 $GLOBALS['tpl']->addAdminPanelToolbar(
810 $toolbar,
811 $this->object->gotItems() ? true : false,
812 $this->object->gotItems() ? true : false
813 );
814 } else {
815 ilUtil::sendInfo($this->lng->txt('msg_no_downloadable_objects'), true);
816 }
817 }
818 }
819 }
ILIAS Setting Class.
static getInstance()
Factory.
$url

References $_GET, $_SESSION, $access, $GLOBALS, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $toolbar, $url, ilUtil\getImagePath(), ilSubmitButton\getInstance(), isActiveAdministrationPanel(), isActiveOrdering(), isMultiDownloadEnabled(), and ilUtil\sendInfo().

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 2633 of file class.ilContainerGUI.php.

2634 {
2636 if ($ilSetting->get("custom_icons")) {
2637 if ($a_form) {
2638 $custom_icon = $this->object->getCustomIconPath();
2639
2640 if ($a_as_section) {
2642 $title->setTitle($this->lng->txt("icon_settings"));
2643 } else {
2644 $title = new ilCustomInputGUI($this->lng->txt("icon_settings"), "");
2645 }
2646 $a_form->addItem($title);
2647
2648 $caption = $this->lng->txt("cont_custom_icon");
2649 $icon = new ilImageFileInputGUI($caption, "cont_icon");
2650 $icon->setSuffixes(array("svg"));
2651 $icon->setUseCache(false);
2652 $icon->setImage($custom_icon);
2653 if ($a_as_section) {
2654 $a_form->addItem($icon);
2655 } else {
2656 $title->addSubItem($icon);
2657 }
2658 }
2659 }
2660 }
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.
addItem($a_item)
Add Item (Property, SectionHeader).

References $ilSetting, $settings, and $title.

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 1042 of file class.ilContainerGUI.php.

1043 {
1044 $lng = $this->lng;
1046
1047 $tpl = new ilTemplate(
1048 "tpl.container_link_help.html",
1049 true,
1050 true,
1051 "Services/Container"
1052 );
1053
1054 $type_ordering = array(
1055 "cat", "fold", "crs", "grp", "chat", "frm", "lres",
1056 "glo", "webr", "file", "exc",
1057 "tst", "svy", "mep", "qpl", "spl");
1058
1059 $childs = $tree->getChilds($_GET["ref_id"]);
1060 foreach ($childs as $child) {
1061 if (in_array($child["type"], array("lm", "sahs", "htlm"))) {
1062 $cnt["lres"]++;
1063 } else {
1064 $cnt[$child["type"]]++;
1065 }
1066 }
1067
1068 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
1069 $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
1070 foreach ($type_ordering as $type) {
1071 $tpl->setCurrentBlock("row");
1072 $tpl->setVariable("ROWCOL", "tblrow" . ((($i++)%2)+1));
1073 if ($type != "lres") {
1074 $tpl->setVariable("TYPE", $lng->txt("objs_" . $type) .
1075 " (" . ((int) $cnt[$type]) . ")");
1076 } else {
1077 $tpl->setVariable("TYPE", $lng->txt("learning_resources") .
1078 " (" . ((int) $cnt["lres"]) . ")");
1079 }
1080 $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
1081 $tpl->parseCurrentBlock();
1082 }
1083 $tpl->show();
1084 exit;
1085 }
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user

References $_GET, $i, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, $type, 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 3257 of file class.ilContainerGUI.php.

3258 {
3259 $tpl = $this->tpl;
3260 $ilToolbar = $this->toolbar;
3261
3262 if ($a_init) {
3263 ilUtil::sendInfo($this->lng->txt('webdav_pwd_instruction'));
3265 }
3266
3267 include_once('Services/WebDAV/classes/class.ilDAVServer.php');
3268 $davServer = ilDAVServer::getInstance();
3269 $ilToolbar->addButton(
3270 $this->lng->txt('mount_webfolder'),
3271 $davServer->getMountURI($this->object->getRefId()),
3272 '_blank',
3273 '',
3274 $davServer->getFolderURI($this->object->getRefId())
3275 );
3276
3277 $tpl->setContent($this->form->getHTML());
3278 }
static getInstance()
Get singelton instance.

References $toolbar, 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 2217 of file class.ilContainerGUI.php.

2218 {
2219 $ilTabs = $this->tabs;
2220 $ilToolbar = $this->toolbar;
2222
2223 $ilTabs->setTabActive('view_content');
2224
2225 if (!in_array($_SESSION['clipboard']['cmd'], array('link', 'copy', 'cut'))) {
2226 $message = __METHOD__ . ": Unknown action.";
2227 $ilErr->raiseError($message, $ilErr->WARNING);
2228 }
2229 $cmd = $_SESSION['clipboard']['cmd'];
2230
2231 //
2232 $exp = $this->getTreeSelectorGUI($cmd);
2233 if ($exp->handleCommand()) {
2234 return;
2235 }
2236 $output = $exp->getHTML();
2237
2238 $txt_var = ($cmd == "copy")
2239 ? "copy"
2240 : "paste";
2241
2242 // toolbars
2243 $t = new ilToolbarGUI();
2244 $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
2245
2246 include_once("./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
2248 $b->setCaption($txt_var);
2249 $b->setCommand("performPasteIntoMultipleObjects");
2250
2251 //$t->addFormButton($this->lng->txt($txt_var), "performPasteIntoMultipleObjects");
2252 $t->addStickyItem($b);
2253
2254 $t->addSeparator();
2255 $this->lng->loadLanguageModule('obj');
2256 $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
2257
2258 $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
2259 $t->setCloseFormTag(false);
2260 $t->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), " ");
2261 $output = $t->getHTML() . $output;
2262 $t->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), " ");
2263 $t->setCloseFormTag(true);
2264 $t->setOpenFormTag(false);
2265 $output.= "<br />" . $t->getHTML();
2266
2267 $this->tpl->setContent($output);
2268 }
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output

References $_SESSION, $error, ilObjectGUI\$ilErr, $message, $output, $t, $tabs, $toolbar, ilUtil\getImagePath(), ilSubmitButton\getInstance(), 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 837 of file class.ilContainerGUI.php.

838 {
839 $GLOBALS["tpl"]->setPermanentLink(
840 $this->object->getType(),
841 $this->object->getRefId(),
842 "",
843 "_top"
844 );
845 }

References $GLOBALS.

Referenced by ilObjCourseGUI\executeCommand(), ilObjGroupGUI\executeCommand(), and 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 526 of file class.ilContainerGUI.php.

527 {
528 include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php";
529 $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
530 $gui->render();
531 }
Render add new item selector.

Referenced by renderObject().

+ Here is the caller graph for this function:

◆ showRepTree()

ilContainerGUI::showRepTree ( )

Show tree.

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

3428 {
3429 $tpl = $this->tpl;
3433
3434 // set current repository view mode
3435 if (!empty($_GET["set_mode"])) {
3436 $_SESSION["il_rep_mode"] = $_GET["set_mode"];
3437 if ($ilUser->getId() != ANONYMOUS_USER_ID) {
3438 $ilUser->writePref("il_rep_mode", $_GET["set_mode"]);
3439 }
3440 }
3441
3442 // get user setting
3443 if ($_SESSION["il_rep_mode"] == "") {
3444 if ($ilUser->getId() != ANONYMOUS_USER_ID) {
3445 $_SESSION["il_rep_mode"] = $ilUser->getPref("il_rep_mode");
3446 }
3447 }
3448
3449 // if nothing set, get default view
3450 if ($_SESSION["il_rep_mode"] == "") {
3451 $_SESSION["il_rep_mode"] = $ilSetting->get("default_repository_view");
3452 }
3453
3454 $mode = ($_SESSION["il_rep_mode"] != "")
3455 ? $_SESSION["il_rep_mode"]
3456 : "flat";
3457
3458 // check for administration context, see #0016312
3459 if ($mode == "tree" && (strtolower($_GET["baseClass"]) != "iladministrationgui")) {
3460 include_once("./Services/Repository/classes/class.ilRepositoryExplorerGUI.php");
3461 $exp = new ilRepositoryExplorerGUI($this, "showRepTree");
3462 if (!$exp->handleCommand()) {
3463 $tpl->setLeftNavContent($exp->getHTML());
3464 }
3465 }
3466 }
Repository explorer GUI class.

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

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

+ Here is the caller graph for this function:

◆ showTreeFlatIcon()

ilContainerGUI::showTreeFlatIcon ( )

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

483 {
485
486 // dont show icon, if role (permission gui->rolegui) is edited
487 if ($_GET["obj_id"] != "") {
488 return;
489 }
490 // hide for member view
491 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
492 if (ilMemberViewSettings::getInstance()->isActive()) {
493 return;
494 }
495
496 $mode = ($_SESSION["il_rep_mode"] == "flat")
497 ? "tree"
498 : "flat";
499 $link = "ilias.php?baseClass=ilRepositoryGUI&amp;cmd=frameset&amp;set_mode=" . $mode . "&amp;ref_id=" . $this->object->getRefId();
500 $tpl->setTreeFlatIcon($link, $mode);
501 }
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 861 of file class.ilContainerGUI.php.

862 {
864
865 $_SESSION["il_cntr_editor"] = "old";
866 $ilCtrl->redirect($this, "editPageFrame");
867 }

References $_SESSION, ilObjectGUI\$ctrl, and $ilCtrl.

◆ switchToStdEditorObject()

ilContainerGUI::switchToStdEditorObject ( )

Switch to standard page editor.

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

851 {
853
854 $_SESSION["il_cntr_editor"] = "std";
855 $ilCtrl->redirect($this, "editPageFrame");
856 }

References $_SESSION, ilObjectGUI\$ctrl, and $ilCtrl.

◆ trashObject()

ilContainerGUI::trashObject ( )

Show trash content of object.

@access public

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

3683 {
3684 $tpl = $this->tpl;
3685
3686 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3687 $ru = new ilRepUtilGUI($this);
3688 $ru->showTrashTable($_GET["ref_id"]);
3689 }

References $_GET, and ilObjectGUI\$tpl.

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

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

3712 {
3713 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3714 $ru = new ilRepUtilGUI($this);
3715 $ru->restoreObjects($_GET["ref_id"], $_POST["trash_id"]);
3716 $this->ctrl->redirect($this, "trash");
3717 }

References $_GET, and $_POST.

◆ useNewEditorObject()

ilContainerGUI::useNewEditorObject ( )

Use new editor (-> delete xhtml content page)

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

873 {
875 $ilAccess = $this->access;
878
879 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
880 include_once("./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
881
882 /* keep old page content for now...
883 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
884 "xhtml_page");
885 if ($xpage_id)
886 {
887 $xpage = new ilXHTMLPage($xpage_id);
888 }
889 */
890
892 $this->object->getId(),
893 "xhtml_page",
894 0
895 );
896
897 ilUtil::sendSuccess($lng->txt("cntr_switched_editor"), true);
898 }
899
900 $ilCtrl->redirect($this, "editPageFrame");
901 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $access

◆ $app_event_handler

ilContainerGUI::$app_event_handler
protected

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

Referenced by removeFromSystemObject().

◆ $bl_cnt

ilContainerGUI::$bl_cnt = 1

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

◆ $db

ilContainerGUI::$db
protected

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

Referenced by renderObject().

◆ $error

◆ $log

ilContainerGUI::$log
protected

◆ $multi_download_enabled

ilContainerGUI::$multi_download_enabled = false

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

Referenced by isMultiDownloadEnabled().

◆ $obj_data_cache

ilContainerGUI::$obj_data_cache
protected

◆ $obj_definition

ilContainerGUI::$obj_definition
protected

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

Referenced by copyObject().

◆ $plugin_admin

ilContainerGUI::$plugin_admin
protected

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

Referenced by getAsynchItemListObject().

◆ $rbacadmin

ilContainerGUI::$rbacadmin
protected

◆ $rbacreview

◆ $rbacsystem

◆ $settings

◆ $tabs

◆ $toolbar

◆ $user


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