ILIAS  release_7 Revision v7.30-3-g800a261c036
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...
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel ()
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink ()
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 getBucketTitle ()
 get proper label to add in the background task popover More...
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 show clipboard More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 @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. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 trash table apply filter More...
 
 trashResetFilterObject ()
 trash table reset filter More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 competencesObject ()
 Redirect to competences. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 Add desktop item @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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 supportsPageEditor ()
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 Save list presentation setting. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (\ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI ($cmd)
 
 initFilter ()
 Init filter. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs @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
 
 $global_screen
 
 $app_event_handler
 
 $ui
 
 $container_filter_service
 
 $container_user_filter = null
 
 $ui_filter
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Detailed Description

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

130 {
131 global $DIC;
132
133 $this->lng = $DIC->language();
134 $this->tpl = $DIC["tpl"];
135 $this->ctrl = $DIC->ctrl();
136 $this->tabs = $DIC->tabs();
137 $this->settings = $DIC->settings();
138 $this->user = $DIC->user();
139 $this->db = $DIC->database();
140 $this->access = $DIC->access();
141 $this->tree = $DIC->repositoryTree();
142 $this->error = $DIC["ilErr"];
143 $this->obj_definition = $DIC["objDefinition"];
144 $this->rbacadmin = $DIC->rbac()->admin();
145 $this->rbacreview = $DIC->rbac()->review();
146 $this->log = $DIC["ilLog"];
147 $this->obj_data_cache = $DIC["ilObjDataCache"];
148 $this->toolbar = $DIC->toolbar();
149 $this->plugin_admin = $DIC["ilPluginAdmin"];
150 $this->app_event_handler = $DIC["ilAppEventHandler"];
151 $this->ui = $DIC->ui();
152 $this->global_screen = $DIC->globalScreen();
153 $rbacsystem = $DIC->rbac()->system();
154 $lng = $DIC->language();
155
156 $this->rbacsystem = $rbacsystem;
157
158 $lng->loadLanguageModule("cntr");
159 $lng->loadLanguageModule('cont');
160
161 // prepare output things should generally be made in executeCommand
162 // method (maybe dependent on current class/command
163 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
164
165 $this->container_filter_service = new ilContainerFilterService();
166 $this->initFilter();
167 }
user()
Definition: user.php:4
error($a_errmsg)
set error message @access public
Container filter service factory.
initFilter()
Init filter.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
settings()
Definition: settings.php:2
ui()
Definition: ui.php:5

References $DIC, ilObjectGUI\$lng, $rbacsystem, ILIAS\GlobalScreen\Provider\__construct(), error(), initFilter(), settings(), ui(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ __showTimingsButton()

ilContainerGUI::__showTimingsButton ( $tpl)

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

860 {
862
863 if (!$tree->checkForParentType($this->object->getRefId(), 'crs')) {
864 return false;
865 }
866 $tpl->setCurrentBlock("custom_button");
867 $tpl->setVariable("ADMIN_MODE_LINK", $this->ctrl->getLinkTargetByClass('ilcoursecontentgui', 'editTimings'));
868 $tpl->setVariable("TXT_ADMIN_MODE", $this->lng->txt('timings_edit'));
869 $tpl->parseCurrentBlock();
870 return true;
871 }

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

◆ _buildPath()

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

build path

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

2829 {
2830 global $DIC;
2831
2832 $tree = $DIC->repositoryTree();
2833
2834 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2835 $counter = 0;
2836 foreach ($path_arr as $data) {
2837 if ($counter++) {
2838 $path .= " > ";
2839 }
2840 $path .= $data['title'];
2841 }
2842
2843 return $path;
2844 }

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

1184 {
1185 $icon = ilUtil::getImagePath("icon_" . $a_type . ".svg");
1186 $title = $this->lng->txt("objs_" . $a_type);
1187
1188 if ($a_show_image) {
1189 $a_tpl->setCurrentBlock("container_header_row_image");
1190 $a_tpl->setVariable("HEADER_IMG", $icon);
1191 $a_tpl->setVariable("HEADER_ALT", $title);
1192 } else {
1193 $a_tpl->setCurrentBlock("container_header_row");
1194 }
1195
1196 $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
1197 $a_tpl->parseCurrentBlock();
1198 //$a_tpl->touchBlock("container_row");
1199 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ addMessageRow()

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

add message row

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

1274 {
1275 $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1276 ? "row_type_2"
1277 : "row_type_1";
1278
1279 $a_tpl->touchBlock($this->cur_row_type);
1280
1281 $type = $this->lng->txt("obj_" . $a_type);
1282 $a_message = str_replace("[type]", $type, $a_message);
1283
1284 $a_tpl->setVariable("ROW_NBSP", " ");
1285
1286 $a_tpl->setCurrentBlock("container_standard_row");
1287 $a_tpl->setVariable(
1288 "BLOCK_ROW_CONTENT",
1289 $a_message
1290 );
1291 $a_tpl->parseCurrentBlock();
1292 $a_tpl->touchBlock("container_row");
1293 }
$type

References $type.

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

Add page tabs.

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

404 {
405 $ilTabs = $this->tabs;
406 $ilCtrl = $this->ctrl;
407
408 $ilTabs->addTarget(
409 "obj_sty",
410 $ilCtrl->getLinkTarget($this, 'editStyleProperties'),
411 "editStyleProperties"
412 );
413 }

References ilObjectGUI\$ctrl, 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 1332 of file class.ilContainerGUI.php.

1333 {
1334 $ilTabs = $this->tabs;
1335 $ilAccess = $this->access;
1336 $lng = $this->lng;
1337 $ilCtrl = $this->ctrl;
1340
1341 if (!is_object($this->object)) {
1342 return;
1343 }
1344
1345 if ($a_include_view && $this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
1346 if (!$this->isActiveAdministrationPanel()) {
1347 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "view"));
1348 } else {
1349 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "disableAdministrationPanel"));
1350 }
1351 }
1352
1353 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1354 (
1355 $this->adminCommands ||
1356 (is_object($this->object) &&
1357 ($this->rbacsystem->checkAccess("write", $this->object->getRefId())))
1358 ||
1359 (is_object($this->object) &&
1360 ($this->object->getHiddenFilesFound())) ||
1361 $_SESSION["clipboard"]
1362 )
1363 ) {
1364 if ($this->isActiveAdministrationPanel()) {
1365 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
1366 } else {
1367 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, "enableAdministrationPanel"));
1368 }
1369 }
1370 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1371 is_object($this->object) &&
1372 $this->rbacsystem->checkAccess("write", $this->object->getRefId()) /* &&
1373 $this->object->getOrderType() == ilContainer::SORT_MANUAL */ // always on because of custom block order
1374 ) {
1375 $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
1376 }
1377 }
$_SESSION["AccountId"]
const ANONYMOUS_USER_ID
Definition: constants.php:25
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17

References $_SESSION, $access, ilObjectGUI\$ctrl, $ilSetting, $ilUser, ilObjectGUI\$lng, $settings, $tabs, $user, ANONYMOUS_USER_ID, 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:

◆ afterUpdate()

ilContainerGUI::afterUpdate ( )
protected

Post (successful) object update hook.

Reimplemented from ilObjectGUI.

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

225 {
226 // check if template is changed
227 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
229 $this->object->getRefId()
230 );
231 $new_tpl_id = (int) $this->getDidacticTemplateVar('dtpl');
232
233 if ($new_tpl_id != $current_tpl_id) {
234 $_REQUEST['tplid'] = $new_tpl_id;
235
236 // redirect to didactic template confirmation
237 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
238 $this->ctrl->setReturn($this, 'edit');
239 $this->ctrl->setCmdClass('ildidactictemplategui');
240 $this->ctrl->setCmd('confirmTemplateSwitch');
241 $dtpl_gui = new ilDidacticTemplateGUI($this);
242 return $this->ctrl->forwardCommand($dtpl_gui);
243 }
244 parent::afterUpdate();
245 }
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 2542 of file class.ilContainerGUI.php.

2543 {
2544 return true;
2545 }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

2535 {
2536 return true;
2537 }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

Reimplemented in ilObjOrgUnitGUI.

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

2132 {
2133 $ilCtrl = $this->ctrl;
2134
2135 unset($_SESSION['clipboard']);
2136 $ilCtrl->returnToParent($this);
2137 }

References $_SESSION, and ilObjectGUI\$ctrl.

◆ cancelPageContentObject()

ilContainerGUI::cancelPageContentObject ( )

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

1080 {
1081 $this->ctrl->redirect($this, "");
1082 }

◆ clearAdminCommandsDetermination()

ilContainerGUI::clearAdminCommandsDetermination ( )

cleaer administration commands determination

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

1133 {
1134 $this->adminCommands = false;
1135 }

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

@access public

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

1748 {
1749 unset($_SESSION["clipboard"]);
1750 unset($_SESSION["il_rep_clipboard"]);
1751
1752 //var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1753
1754 // only redirect if clipboard was cleared
1755 if (isset($_POST["cmd"]["clear"])) {
1756 ilUtil::sendSuccess($this->lng->txt("msg_clear_clipboard"), true);
1757 // fixed mantis 0018474: Clear Clipboard redirects to Subtab View, instead of Subtab "Edit Multiple"
1758 $this->ctrl->redirect($this, 'render');
1759 }
1760 }
$_POST["username"]

References $_POST, and $_SESSION.

Referenced by pasteObject(), and performPasteIntoMultipleObjectsObject().

+ Here is the caller graph for this function:

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

show clipboard

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

2437 {
2439 $ilLog = $this->log;
2440 $ilTabs = $this->tabs;
2441 $tpl = $this->tpl;
2442 $ilToolbar = $this->toolbar;
2443 $ilCtrl = $this->ctrl;
2444 $lng = $this->lng;
2445
2446 $ilTabs->activateTab("clipboard");
2447
2448 // function should not be called if clipboard is empty
2449 if (empty($_SESSION['clipboard']) or !is_array($_SESSION['clipboard'])) {
2450 $message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2451 $ilLog->write($message, $ilLog->FATAL);
2452 $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->WARNING);
2453 }
2454
2455 $data = array();
2456 foreach ($_SESSION["clipboard"]["ref_ids"] as $ref_id) {
2457 if (!$tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id, false)) {
2458 continue;
2459 }
2460
2461 $data[] = array(
2462 "type" => $tmp_obj->getType(),
2463 "type_txt" => $this->lng->txt("obj_" . $tmp_obj->getType()),
2464 "title" => $tmp_obj->getTitle(),
2465 "cmd" => ($_SESSION["clipboard"]["cmd"] == "cut") ? $this->lng->txt("move") :$this->lng->txt($_SESSION["clipboard"]["cmd"]),
2466 "ref_id" => $ref_id,
2467 "obj_id" => $tmp_obj->getId()
2468 );
2469
2470 unset($tmp_obj);
2471 }
2472
2473 include_once("./Services/Object/classes/class.ilObjClipboardTableGUI.php");
2474 $tab = new ilObjClipboardTableGUI($this, "clipboard");
2475 $tab->setData($data);
2476 $tpl->setContent($tab->getHTML());
2477
2478 if (count($data) > 0) {
2479 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2480 $ilToolbar->addFormButton(
2481 $lng->txt("insert_object_here"),
2482 "paste"
2483 );
2484 $ilToolbar->addFormButton(
2485 $lng->txt("clear_clipboard"),
2486 "clear"
2487 );
2488 }
2489
2490 return true;
2491 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$message
Definition: xapiexit.php:14

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

+ Here is the call graph for this function:

◆ cloneAllObject()

ilContainerGUI::cloneAllObject ( )

Clone all object Overwritten method for copying container objects.

@access public

Reimplemented from ilObjectGUI.

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

2688 {
2689 $ilLog = $this->log;
2690 $ilCtrl = $this->ctrl;
2691
2692 include_once('./Services/Link/classes/class.ilLink.php');
2693 include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
2694
2695 $ilAccess = $this->access;
2700
2701 $new_type = $_REQUEST['new_type'];
2702 $ref_id = (int) $_GET['ref_id'];
2703 $clone_source = (int) $_REQUEST['clone_source'];
2704
2705 if (!$rbacsystem->checkAccess('create', $ref_id, $new_type)) {
2706 $ilErr->raiseError($this->lng->txt('permission_denied'));
2707 }
2708 if (!$clone_source) {
2709 ilUtil::sendFailure($this->lng->txt('select_one'));
2710 $this->createObject();
2711 return false;
2712 }
2713 if (!$ilAccess->checkAccess('write', '', $clone_source, $new_type)) {
2714 $ilErr->raiseError($this->lng->txt('permission_denied'));
2715 }
2716
2717 $options = $_POST['cp_options'] ? $_POST['cp_options'] : array();
2718 $orig = ilObjectFactory::getInstanceByRefId($clone_source);
2719 $result = $orig->cloneAllObject($_COOKIE[session_name()], $_COOKIE['ilClientId'], $new_type, $ref_id, $clone_source, $options);
2720
2721 include_once './Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
2722 if (ilCopyWizardOptions::_isFinished($result['copy_id'])) {
2723 ilUtil::sendSuccess($this->lng->txt("object_duplicated"), true);
2724 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $result['ref_id']);
2725 $ilCtrl->redirectByClass("ilrepositorygui", "");
2726 } else {
2727 ilUtil::sendInfo($this->lng->txt("object_copy_in_progress"), true);
2728 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
2729 $ilCtrl->redirectByClass("ilrepositorygui", "");
2730 }
2731 }
$result
$_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.
$_COOKIE[session_name()]
Definition: xapitoken.php:37

References $_COOKIE, $_GET, $_POST, $access, ilObjectGUI\$ctrl, $error, ilObjectGUI\$ilErr, $ilUser, $log, $rbacsystem, ilObjectGUI\$ref_id, $result, ilObjectGUI\$tree, $user, ilCopyWizardOptions\_isFinished(), ilObjectGUI\createObject(), ilObjectFactory\getInstanceByRefId(), ilUtil\sendFailure(), and ilUtil\sendInfo().

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

2766 {
2768
2769 // clone the source node
2770 $srcObj = ilObjectFactory::getInstanceByRefId($srcRef);
2771 error_log(__METHOD__ . ' cloning srcRef=' . $srcRef . ' dstRef=' . $dstRef . '...');
2772 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
2773 error_log(__METHOD__ . ' ...cloning... newRef=' . $newRef . '...');
2774
2775 // We must immediately apply a new name to the object, to
2776 // prevent confusion of WebDAV clients about having two objects with identical
2777 // name in the repository.
2778 if (!is_null($newName)) {
2779 $newObj = ilObjectFactory::getInstanceByRefId($newRef);
2780 $newObj->setTitle($newName);
2781 $newObj->update();
2782 unset($newObj);
2783 }
2784 unset($srcObj);
2785 $mapping[$newRef] = $srcRef;
2786
2787 // clone all children of the source node
2788 $children = $tree->getChilds($srcRef);
2789 foreach ($tree->getChilds($srcRef) as $child) {
2790 // Don't clone role folders, because it does not make sense to clone local roles
2791 // FIXME - Maybe it does make sense (?)
2792 if ($child["type"] != 'rolf') {
2793 $this->cloneNodes($child["ref_id"], $newRef, $mapping);
2794 } else {
2795 if (count($rolf = $tree->getChildsByType($newRef, "rolf"))) {
2796 $mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
2797 }
2798 }
2799 }
2800 error_log(__METHOD__ . ' ...cloned srcRef=' . $srcRef . ' dstRef=' . $dstRef . ' newRef=' . $newRef);
2801 return $newRef;
2802 }
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.

References ilObjectGUI\$tree, cloneNodes(), 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 2566 of file class.ilContainerGUI.php.

2567 {
2568 $this->cloneWizardPageObject(false);
2569 }
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 2577 of file class.ilContainerGUI.php.

2578 {
2579 include_once('Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2580
2581 $ilObjDataCache = $this->obj_data_cache;
2583
2584 if (!$_REQUEST['clone_source']) {
2585 ilUtil::sendFailure($this->lng->txt('select_one'));
2586 if (isset($_SESSION['wizard_search_title'])) {
2587 $this->searchCloneSourceObject();
2588 } else {
2589 $this->createObject();
2590 }
2591 return false;
2592 }
2593 $source_id = $_REQUEST['clone_source'];
2594 $new_type = $_REQUEST['new_type'];
2595 $this->ctrl->setParameter($this, 'clone_source', (int) $_REQUEST['clone_source']);
2596 $this->ctrl->setParameter($this, 'new_type', $new_type);
2597
2598
2599 // Generell JavaScript
2600 $this->tpl->addJavaScript('./Services/CopyWizard/js/ilContainer.js');
2601 $this->tpl->setVariable('BODY_ATTRIBUTES', 'onload="ilDisableChilds(\'cmd\');"');
2602
2603
2604 $this->tpl->addBlockFile(
2605 'ADM_CONTENT',
2606 'adm_content',
2607 'tpl.container_wizard_page.html',
2608 "Services/Container"
2609 );
2610 $this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this));
2611 $this->tpl->setVariable('TYPE_IMG', ilUtil::getImagePath('icon_' . $new_type . '.svg'));
2612 $this->tpl->setVariable('ALT_IMG', $this->lng->txt('obj_' . $new_type));
2613 $this->tpl->setVariable('TXT_DUPLICATE', $this->lng->txt($new_type . '_wizard_page'));
2614 $this->tpl->setVariable('INFO_DUPLICATE', $this->lng->txt($new_type . '_copy_threads_info'));
2615 $this->tpl->setVariable('BTN_COPY', $this->lng->txt('obj_' . $new_type . '_duplicate'));
2616 $this->tpl->setVariable('BTN_BACK', $this->lng->txt('btn_back'));
2617 if (isset($_SESSION['wizard_search_title'])) {
2618 $this->tpl->setVariable('CMD_BACK', 'searchCloneSource');
2619 } else {
2620 $this->tpl->setVariable('CMD_BACK', 'create');
2621 }
2622
2623 $this->tpl->setVariable('BTN_TREE', $this->lng->txt('treeview'));
2624 $this->tpl->setVariable('BTN_LIST', $this->lng->txt('flatview'));
2625
2626 // Fill item rows
2627 // tree view
2628 if ($a_tree_view) {
2629 $first = true;
2630 $has_items = false;
2631 foreach ($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id), true) as $node) {
2632 if ($first == true) {
2633 $first = false;
2634 continue;
2635 }
2636
2637 if ($node['type'] == 'rolf') {
2638 continue;
2639 }
2640
2641 $has_items = true;
2642
2643 for ($i = $source_node['depth'];$i < $node['depth']; $i++) {
2644 $this->tpl->touchBlock('padding');
2645 $this->tpl->touchBlock('end_padding');
2646 }
2647 // fill options
2648 $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id, $node['type']);
2649 $copy_wizard_page->fillTreeSelection($node['ref_id'], $node['type'], $node['depth']);
2650
2651 $this->tpl->setCurrentBlock('tree_row');
2652 $this->tpl->setVariable('TREE_IMG', ilUtil::getImagePath('icon_' . $node['type'] . '.svg'));
2653 $this->tpl->setVariable('TREE_ALT_IMG', $this->lng->txt('obj_' . $node['type']));
2654 $this->tpl->setVariable('TREE_TITLE', $node['title']);
2655 $this->tpl->parseCurrentBlock();
2656 }
2657 if (!$has_items) {
2658 $this->tpl->setCurrentBlock('no_content');
2659 $this->tpl->setVariable('TXT_NO_CONTENT', $this->lng->txt('container_no_items'));
2660 $this->tpl->parseCurrentBlock();
2661 } else {
2662 $this->tpl->setCurrentBlock('tree_footer');
2663 $this->tpl->setVariable('TXT_COPY_ALL', $this->lng->txt('copy_all'));
2664 $this->tpl->setVariable('TXT_LINK_ALL', $this->lng->txt('link_all'));
2665 $this->tpl->setVariable('TXT_OMIT_ALL', $this->lng->txt('omit_all'));
2666 $this->tpl->parseCurrentBlock();
2667 }
2668 } else {
2669 foreach ($tree->getSubTreeTypes($source_id, array('rolf','crs')) as $type) {
2670 $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id, $type);
2671 if (strlen($html = $copy_wizard_page->getWizardPageBlockHTML())) {
2672 $this->tpl->setCurrentBlock('obj_row');
2673 $this->tpl->setVariable('ITEM_BLOCK', $html);
2674 $this->tpl->parseCurrentBlock();
2675 }
2676 }
2677 }
2678 }
static _getInstanceByType($a_source_id, $a_item_type)
Get instance by type.
$i
Definition: metadata.php:24

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

2555 {
2556 $this->cloneWizardPageObject(true);
2557 }

References cloneWizardPageObject().

+ Here is the call graph for this function:

◆ competencesObject()

ilContainerGUI::competencesObject ( )

Redirect to competences.

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

3801 {
3803
3804 $ctrl->redirectByClass(["ilContainerSkillGUI", "ilContSkillPresentationGUI"]);
3805 }

References ilObjectGUI\$ctrl.

◆ confirmRemoveFromSystemObject()

ilContainerGUI::confirmRemoveFromSystemObject ( )

confirmation screen remove from system

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

3645 {
3646 $lng = $this->lng;
3647 $this->checkPermission("write");
3648 include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3649
3650 if (!isset($_POST["trash_id"])) {
3651 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3652 $this->ctrl->redirect($this, "trash");
3653 }
3654
3655 $ru = new ilRepUtilGUI($this);
3656 $ru->confirmRemoveFromSystemObject($_POST["trash_id"]);
3657 }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
Repository GUI Utilities.

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

+ Here is the call 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 1555 of file class.ilContainerGUI.php.

1556 {
1558 $ilCtrl = $this->ctrl;
1561
1562 $no_copy = [];
1563
1564 if ($_GET["item_ref_id"] != "") {
1565 $_POST["id"] = array($_GET["item_ref_id"]);
1566 }
1567
1568 if (!isset($_POST["id"])) {
1569 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1570 }
1571
1572 // FOR ALL OBJECTS THAT SHOULD BE COPIED
1573 $containers = 0;
1574 foreach ($_POST["id"] as $ref_id) {
1575 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1576 $node_data = $this->tree->getNodeData($ref_id);
1577
1578 // count containers
1579 if ($objDefinition->isContainer($node_data["type"])) {
1580 $containers++;
1581 }
1582
1583 $subtree_nodes = $this->tree->getSubTree($node_data);
1584
1585 $all_node_data[] = $node_data;
1586 $all_subtree_nodes[] = $subtree_nodes;
1587
1588 // CHECK COPY PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1589 foreach ($subtree_nodes as $node) {
1590 if ($node['type'] == 'rolf') {
1591 continue;
1592 }
1593
1594 if (!$rbacsystem->checkAccess('visible,read,copy', $node["ref_id"])) {
1595 $no_copy[] = $node["ref_id"];
1596 }
1597 }
1598 }
1599
1600 if ($containers > 0 && count($_POST["id"]) > 1) {
1601 $ilErr->raiseError($this->lng->txt("cntr_container_only_on_their_own"), $ilErr->MESSAGE);
1602 }
1603
1604 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1605 if (is_array($no_copy) && count($no_copy)) {
1606 $titles = array();
1607 foreach ((array) $no_copy as $copy_id) {
1608 $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($copy_id));
1609 }
1610 $ilErr->raiseError(
1611 $this->lng->txt("msg_no_perm_copy") . " " . implode(',', $titles),
1612 $ilErr->MESSAGE
1613 );
1614 }
1615
1616 // if we have a single container, set it as source id and redirect to ilObjectCopyGUI
1617 if (count($_POST["id"]) == 1) {
1618 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $_POST["id"][0]);
1619 $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1620 } else {
1621 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode("_", $_POST["id"]));
1622 $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1623 }
1624
1625 $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1626 $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1627 $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1628
1629 ilUtil::sendInfo($this->lng->txt("msg_copy_clipboard"), true);
1630
1632 } // END COPY
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ctrl, $error, 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 2984 of file class.ilContainerGUI.php.

2985 {
2986 $ilCtrl = $this->ctrl;
2987
2988 $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
2989 }

References ilObjectGUI\$ctrl.

◆ cutObject()

ilContainerGUI::cutObject ( )

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

@access public

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

1493 {
1495 $ilCtrl = $this->ctrl;
1497
1498 if ($_GET["item_ref_id"] != "") {
1499 $_POST["id"] = array($_GET["item_ref_id"]);
1500 }
1501
1502 $no_cut = [];
1503
1504 if (!isset($_POST["id"])) {
1505 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1506 }
1507
1508 // FOR ALL OBJECTS THAT SHOULD BE COPIED
1509 foreach ($_POST["id"] as $ref_id) {
1510 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1511 $node_data = $this->tree->getNodeData($ref_id);
1512 $subtree_nodes = $this->tree->getSubTree($node_data);
1513
1514 $all_node_data[] = $node_data;
1515 $all_subtree_nodes[] = $subtree_nodes;
1516
1517 // CHECK DELETE PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1518 foreach ($subtree_nodes as $node) {
1519 if ($node['type'] == 'rolf') {
1520 continue;
1521 }
1522
1523 if (!$rbacsystem->checkAccess('delete', $node["ref_id"])) {
1524 $no_cut[] = $node["ref_id"];
1525 }
1526 }
1527 }
1528 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1529 if (count($no_cut)) {
1530 $titles = array();
1531 foreach ((array) $no_cut as $cut_id) {
1532 $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($cut_id));
1533 }
1534 $ilErr->raiseError(
1535 $this->lng->txt("msg_no_perm_cut") . " " . implode(',', (array) $titles),
1536 $ilErr->MESSAGE
1537 );
1538 }
1539 $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1540 $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1541 $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1542
1543 ilUtil::sendInfo($this->lng->txt("msg_cut_clipboard"), true);
1544
1545 return $this->initAndDisplayMoveIntoObjectObject();
1546 } // END CUT

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

Referenced by ilObjLearningSequenceGUI\executeCommand().

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

◆ deleteStyleObject()

ilContainerGUI::deleteStyleObject ( )

Delete Style.

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

3005 {
3006 $ilCtrl = $this->ctrl;
3007
3008 $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
3009 }

References ilObjectGUI\$ctrl.

◆ disableAdministrationPanelObject()

ilContainerGUI::disableAdministrationPanelObject ( )

enable administration panel

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

1431 {
1432 $_SESSION["il_cont_admin_panel"] = false;
1433 $this->ctrl->redirect($this, "render");
1434 }

References $_SESSION.

◆ downloadObject()

ilContainerGUI::downloadObject ( )

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

1635 {
1637 // This variable determines whether the task has been initiated by a folder's action drop-down to prevent a folder
1638 // duplicate inside the zip.
1639 $initiated_by_folder_action = false;
1640
1641 if ($_GET["item_ref_id"] != "") {
1642 $_POST["id"] = array($_GET["item_ref_id"]);
1643 }
1644
1645 if (!isset($_POST["id"])) {
1647 $object_type = $object->getType();
1648 if ($object_type == "fold") {
1649 $_POST["id"] = array($_GET['ref_id']);
1650 $initiated_by_folder_action = true;
1651 } else {
1652 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1653 }
1654 }
1655
1656 include_once './Services/Container/classes/BackgroundTasks/class.ilDownloadContainerFilesBackgroundTask.php';
1657 $download_job = new ilDownloadContainerFilesBackgroundTask($GLOBALS['DIC']->user()->getId(), $_POST["id"], $initiated_by_folder_action);
1658
1659 $download_job->setBucketTitle($this->getBucketTitle());
1660 if ($download_job->run()) {
1661 ilUtil::sendSuccess($this->lng->txt('msg_bt_download_started'), true);
1662 }
1663 $GLOBALS['DIC']->ctrl()->redirect($this);
1664 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
getBucketTitle()
get proper label to add in the background task popover

References $_GET, $_POST, $error, $GLOBALS, ilObjectGUI\$ilErr, ilObjectGUI\$object, getBucketTitle(), ilObjectFactory\getInstanceByRefId(), and user().

+ Here is the call graph for this function:

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

Edit order.

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

1440 {
1441 $ilTabs = $this->tabs;
1442
1443 $this->edit_order = true;
1444 $_SESSION["il_cont_admin_panel"] = false;
1445 $this->renderObject();
1446
1447 $ilTabs->activateSubTab("ordering");
1448 }
renderObject()
render the object

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

968 {
972 $ilCtrl = $this->ctrl;
974
975 if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
976 $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
977 }
978
980 $this->object->getId(),
981 "xhtml_page"
982 );
983 if ($xpage_id > 0) {
984 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
985 $xpage = new ilXHTMLPage($xpage_id);
986 $content = $xpage->getContent();
987 }
988
989 // get template
990 $tpl->addBlockFile(
991 "ADM_CONTENT",
992 "adm_content",
993 "tpl.container_edit_page_content.html",
994 "Services/Container"
995 );
996 $tpl->setVariable("VAL_CONTENT", ilUtil::prepareFormOutput($content));
997 $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
998 $tpl->setVariable(
999 "TXT_EDIT_PAGE_CONTENT",
1000 $this->lng->txt("edit_page_content")
1001 );
1002 $tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
1003 $tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
1004 $tpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_old_editor_warning"));
1005 $tpl->setVariable("TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt("cntr_old_editor_open_standard_editor"));
1006 $tpl->setVariable("IMG_WARNING", ilUtil::getImagePath("icon_alert.svg"));
1007 $tpl->setVariable("HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this, "switchToStdEditor"));
1008 $tpl->setVariable("ALT_WARNING", $lng->txt("warning"));
1009
1010 include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
1011 include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
1012 //$ta = new ilTextAreaInputGUI();
1013 //$tags = $ta->getRteTagSet("extended_table_img");
1014
1015 // add rte support
1016 include_once "./Services/RTE/classes/class.ilRTE.php";
1017 $rtestring = ilRTE::_getRTEClassname();
1018 include_once "./Services/RTE/classes/class.$rtestring.php";
1019 $rte = new $rtestring();
1020 //$rte->addPlugin("latex");
1021 include_once "./Services/Object/classes/class.ilObject.php";
1023 $obj_type = ilObject::_lookupType($_GET["ref_id"], true);
1024 $rte->addRTESupport($obj_id, $obj_type);
1025 //$rte->setStyleSelect(true);
1026 //$rte->addCustomRTESupport($obj_id, $obj_type, $tags);
1027 }
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, 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 948 of file class.ilContainerGUI.php.

949 {
950 // old tiny stuff
952 $this->object->getId(),
953 "xhtml_page"
954 );
955 if ($xpage_id > 0 && $_SESSION["il_cntr_editor"] != "std") {
956 $this->ctrl->redirect($this, "editPageContent");
957 } else {
958 $this->ctrl->redirectByClass(array("ilcontainerpagegui"), "edit");
959 }
960 }

References $_SESSION, and ilContainer\_lookupContainerSetting().

+ Here is the call graph for this function:

◆ editStyleObject()

ilContainerGUI::editStyleObject ( )

Edit Style.

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

2995 {
2996 $ilCtrl = $this->ctrl;
2997
2998 $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
2999 }

References ilObjectGUI\$ctrl.

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

Edit style properties.

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

2854 {
2855 $ilTabs = $this->tabs;
2856 $tpl = $this->tpl;
2857
2858 $this->checkPermission("write");
2859
2860 $this->initStylePropertiesForm();
2861 $tpl->setContent($this->form->getHTML());
2862
2863 $ilTabs->activateTab("obj_sty");
2864 }
initStylePropertiesForm()
Init style properties form.

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

1422 {
1423 $_SESSION["il_cont_admin_panel"] = true;
1424 $this->ctrl->redirect($this, "render");
1425 }

References $_SESSION.

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

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

1476 {
1477 $this->multi_download_enabled = true;
1478 $this->renderObject();
1479 }

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

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

174 {
176
177 $next_class = $this->ctrl->getNextClass();
178 $cmd = $this->ctrl->getCmd("render");
179
180
181 switch ($next_class) {
182 // page editing
183 case "ilcontainerpagegui":
184 if ($_GET["redirectSource"] != "ilinternallinkgui") {
185 $ret = $this->forwardToPageObject();
186 $tpl->setContent($ret);
187 } else {
188 return "";
189 }
190 break;
191
192 case "ilobjstylesheetgui":
193 $this->forwardToStyleSheet();
194 break;
195
196 default:
197 $this->prepareOutput();
198 $cmd .= "Object";
199 $this->$cmd();
200 break;
201 }
202 return true;
203 }
& 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 3216 of file class.ilContainerGUI.php.

3217 {
3219
3220 $tpl = new ilTemplate('tpl.fm_launch_ws.html', false, false, 'Services/WebServices/FileManager');
3221 $tpl->setVariable('JNLP_URL', ILIAS_HTTP_PATH . '/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
3222 $tpl->setVariable('SESSION_ID', $_COOKIE[session_name()] . '::' . CLIENT_ID);
3223 $tpl->setVariable('UID', $ilUser->getId());
3224 $tpl->setVariable('REF_ID', $this->object->getRefId());
3225 $tpl->setVariable('WSDL_URI', ILIAS_HTTP_PATH . '/webservice/soap/server.php?wsdl');
3226 $tpl->setVariable('LOCAL_FRAME', ilFMSettings::getInstance()->isLocalFSEnabled() ? 1 : 0);
3227 $tpl->setVariable('REST_URI', ILIAS_HTTP_PATH . '/Services/WebServices/Rest/server.php');
3228 $tpl->setVariable('FILE_LOCKS', 0);
3229 $tpl->setVariable('UPLOAD_FILESIZE', ilFMSettings::getInstance()->getMaxFileSize());
3230
3231 include_once("./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
3232 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
3233 $tpl->setVariable('HEADER_TITLE', $header_top_title ? $header_top_title : '');
3234 echo $tpl->get();
3235 exit;
3236 }
special template class to simplify handling of ITX/PEAR
const CLIENT_ID
Definition: constants.php:39
exit
Definition: login.php:29

References $_COOKIE, $ilUser, ilObjectGUI\$tpl, $user, CLIENT_ID, and exit.

◆ forwardToPageObject()

& ilContainerGUI::forwardToPageObject ( )

forward command to page object

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

287 {
289 $ilTabs = $this->tabs;
290 $ilCtrl = $this->ctrl;
291
292 $cmd = $ilCtrl->getCmd();
293
294 if (in_array($cmd, array("displayMediaFullscreen", "downloadFile", "displayMedia"))) {
295 $this->checkPermission("read");
296 } else {
297 $this->checkPermission("write");
298 }
299
300 $ilTabs->clearTargets();
301
302 if ($_GET["redirectSource"] == "ilinternallinkgui") {
303 exit;
304 }
305
307 $this->object->getId(),
308 "xhtml_page"
309 );
310 if ($xpage_id > 0) {
311 $ilTabs->setBackTarget(
312 $lng->txt("cntr_back_to_old_editor"),
313 $ilCtrl->getLinkTarget($this, "switchToOldEditor"),
314 "_top"
315 );
316 } else {
317 $ilTabs->setBackTarget(
318 $lng->txt("back"),
319 $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "edit")
320 );
321 }
322
323 // page object
324 include_once("./Services/Container/classes/class.ilContainerPage.php");
325 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
326
327 $lng->loadLanguageModule("content");
328
329 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
330 $this->tpl->addCss(ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
331 // $this->tpl->setCurrentBlock("SyntaxStyle");
332 $this->tpl->addCss(ilObjStyleSheet::getSyntaxStylePath());
333 // $this->tpl->parseCurrentBlock();
334
336 "cont",
337 $this->object->getId()
338 )) {
339 // doesn't exist -> create new one
340 $new_page_object = new ilContainerPage();
341 $new_page_object->setParentId($this->object->getId());
342 $new_page_object->setId($this->object->getId());
343 $new_page_object->createFromXML();
344 }
345
346 // get page object
347 $this->ctrl->setReturnByClass("ilcontainerpagegui", "edit");
348 $page_gui = new ilContainerPageGUI($this->object->getId());
349 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
351 $this->object->getStyleSheetId(),
352 $this->object->getType()
353 ));
354
355 $page_gui->setTemplateTargetVar("ADM_CONTENT");
356 $page_gui->setFileDownloadLink("");
357 //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
358 $page_gui->setPresentationTitle("");
359 $page_gui->setTemplateOutput(false);
360
361 // old editor information text
363 $this->object->getId(),
364 "xhtml_page"
365 );
366 if ($xpage_id > 0) {
367 $wtpl = new ilTemplate(
368 "tpl.cntr_old_editor_message.html",
369 true,
370 true,
371 "Services/Container"
372 );
373 $wtpl->setVariable("ALT_WARNING", $lng->txt("warning"));
374 $wtpl->setVariable(
375 "IMG_WARNING",
376 ilUtil::getImagePath("icon_alert.svg")
377 );
378 $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
379 $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
380 $wtpl->setVariable(
381 "HREF_SWITCH_TO_NEW_EDITOR",
382 $ilCtrl->getLinkTarget($this, "useNewEditor")
383 );
384 $wtpl->setVariable(
385 "TXT_MIGRATION_SWITCH",
386 $lng->txt("cntr_switch_to_new_editor_cmd")
387 );
388 $page_gui->setPrependingHtml($wtpl->get());
389 }
390
391 // style tab
392 $page_gui->setTabHook($this, "addPageTabs");
393
394 $ret = $this->ctrl->forwardCommand($page_gui);
395
396 //$ret =& $page_gui->executeCommand();
397 return $ret;
398 }
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, $add_token=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, 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 251 of file class.ilContainerGUI.php.

252 {
253 $ilCtrl = $this->ctrl;
254 $ilTabs = $this->tabs;
255
256 $ilTabs->clearTargets();
257
258 $cmd = $ilCtrl->getCmd();
259 include_once("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
260 $this->ctrl->setReturn($this, "editStyleProperties");
261 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
262 $style_gui->omitLocator();
263 if ($cmd == "create" || $_GET["new_type"] == "sty") {
264 $style_gui->setCreationMode(true);
265 }
266
267 if ($cmd == "confirmedDelete") {
268 $this->object->setStyleSheetId(0);
269 $this->object->update();
270 }
271
272 $ret = $this->ctrl->forwardCommand($style_gui);
273
274 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
275 $style_id = $ret;
276 $this->object->setStyleSheetId($style_id);
277 $this->object->update();
278 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
279 }
280 }
Class ilObjStyleSheetGUI.

References $_GET, ilObjectGUI\$ctrl, $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:

◆ getAdminTabs()

ilContainerGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Reimplemented in ilObjOrgUnitGUI.

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

3764 {
3766
3767 if ($this->checkPermissionBool("visible,read")) {
3768 $this->tabs_gui->addTab(
3769 'view',
3770 $this->lng->txt('view'),
3771 $this->ctrl->getLinkTarget($this, 'view')
3772 );
3773 }
3774
3775 // Always show container trash
3776 $this->tabs_gui->addTab(
3777 'trash',
3778 $this->lng->txt('trash'),
3779 $this->ctrl->getLinkTarget($this, 'trash')
3780 );
3781
3782 if ($this->checkPermissionBool("edit_permission")) {
3783 $this->tabs_gui->addTab(
3784 'perm_settings',
3785 $this->lng->txt('perm_settings'),
3786 $this->ctrl->getLinkTargetByClass(
3787 [
3788 get_class($this),
3789 'ilpermissiongui'
3790 ],
3791 'perm'
3792 )
3793 );
3794 }
3795 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.

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

+ Here is the call graph for this function:

◆ getAsynchItemListObject()

ilContainerGUI::getAsynchItemListObject ( )

Get item list command drop down asynchronously.

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

3033 {
3034 $ilCtrl = $this->ctrl;
3035
3036 $ref_id = $_GET["cmdrefid"];
3039
3040 // this should be done via container-object->getSubItem in the future
3041 $data = array("child" => $ref_id, "ref_id" => $ref_id, "obj_id" => $obj_id,
3042 "type" => $type);
3043 include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
3045 $item_list_gui->setContainerObject($this);
3046
3047 $item_list_gui->enableComments(true);
3048 $item_list_gui->enableNotes(true);
3049 $item_list_gui->enableTags(true);
3050
3051 $this->modifyItemGUI($item_list_gui, $data, false);
3052 $html = $item_list_gui->getListItemHTML(
3053 $ref_id,
3054 $obj_id,
3055 "",
3056 "",
3057 true,
3058 true
3059 );
3060
3061 // include plugin slot for async item list
3062 $ilPluginAdmin = $this->plugin_admin;
3063 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
3064 foreach ($pl_names as $pl) {
3065 $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
3066 $gui_class = $ui_plugin->getUIClassInstance();
3067 $resp = $gui_class->getHTML("Services/Container", "async_item_list", array("html" => $html));
3068 if ($resp["mode"] != ilUIHookPluginGUI::KEEP) {
3069 $html = $gui_class->modifyHTML($html, $resp);
3070 }
3071 }
3072
3073 echo $html;
3074 exit;
3075 }
const IL_COMP_SERVICE
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify list gui for presentation in container.
static _getListGUIByType( $type, $context=ilObjectListGUI::CONTEXT_REPOSITORY)
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.

References $_GET, ilObjectGUI\$ctrl, ilObjectGUI\$data, ilObjectGUI\$obj_id, $plugin_admin, ilObjectGUI\$ref_id, XapiProxy\$resp, $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:

◆ getBucketTitle()

ilContainerGUI::getBucketTitle ( )

get proper label to add in the background task popover

Returns
string

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

1671 {
1672 return $bucket_title = ilUtil::getAsciiFilename($this->object->getTitle());
1673 }

Referenced by downloadObject().

+ Here is the caller graph for this function:

◆ getContainerPageHTML()

ilContainerGUI::getContainerPageHTML ( )

Get container page HTML.

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

419 {
422
423 if (!$ilSetting->get("enable_cat_page_edit") || $this->object->filteredSubtree()) {
424 return;
425 }
426
427 // old page editor content
429 $this->object->getId(),
430 "xhtml_page"
431 );
432 if ($xpage_id > 0) {
433 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
434 $xpage = new ilXHTMLPage($xpage_id);
435 return $xpage->getContent();
436 }
437
438
439 // page object
440
441
442 // if page does not exist, return nothing
443 include_once("./Services/COPage/classes/class.ilPageUtil.php");
445 "cont",
446 $this->object->getId()
447 )) {
448 return "";
449 }
450 include_once("./Services/Container/classes/class.ilContainerPage.php");
451 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
452
453 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
454 $this->tpl->setVariable(
455 "LOCATION_CONTENT_STYLESHEET",
456 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
457 );
458 $this->tpl->setCurrentBlock("SyntaxStyle");
459 $this->tpl->setVariable(
460 "LOCATION_SYNTAX_STYLESHEET",
462 );
463 $this->tpl->parseCurrentBlock();
464
465 // get page object
466 include_once("./Services/Object/classes/class.ilObjectTranslation.php");
467 $ot = ilObjectTranslation::getInstance($this->object->getId());
468 $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
469 $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
470 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
472 $this->object->getStyleSheetId(),
473 $this->object->getType()
474 ));
475
476 $page_gui->setPresentationTitle("");
477 $page_gui->setTemplateOutput(false);
478 $page_gui->setHeader("");
479 $ret = $page_gui->showPage();
480
481 //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
482
483 //$ret =& $page_gui->executeCommand();
484 return $ret;
485 }
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: xapiexit.php:8

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

568 {
569 $view_mode = $this->object->getViewMode();
570 if ($this->object->filteredSubtree()) {
571 $view_mode = ilContainer::VIEW_SIMPLE;
572 }
573 switch ($view_mode) {
574 // all items in one block
576 include_once("./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
577 $container_view = new ilContainerSimpleContentGUI($this);
578 break;
579
581 include_once('./Services/Container/classes/class.ilContainerObjectiveGUI.php');
582 $container_view = new ilContainerObjectiveGUI($this);
583 break;
584
585 // all items in one block
587 case ilCourseConstants::IL_CRS_VIEW_TIMING: // not nice this workaround
588 include_once("./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
589 $container_view = new ilContainerSessionsContentGUI($this);
590 break;
591
592 // all items in one block
594 default:
595 include_once("./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
596 $container_view = new ilContainerByTypeContentGUI($this, $this->container_user_filter);
597 break;
598 }
599 return $container_view;
600 }
GUI class for course objective view.

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

Referenced by redrawListItemObject(), renderBlockAsynchObject(), 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 210 of file class.ilContainerGUI.php.

211 {
212 $values = parent::getEditFormValues();
213
214 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
215 $values['didactic_type'] =
216 'dtpl_' . ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
217
218 return $values;
219 }

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

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

1385 {
1387 $ilCtrl = $this->ctrl;
1388
1389 // edit permissions
1390 if ($rbacsystem->checkAccess('edit_permission', $this->ref_id)) {
1391 $this->tabs_gui->addTarget(
1392 "perm_settings",
1393 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1394 array("perm","info","owner"),
1395 'ilpermissiongui'
1396 );
1397 if ($ilCtrl->getNextClass() == "ilpermissiongui") {
1398 $this->tabs_gui->activateTab("perm_settings");
1399 }
1400 }
1401
1402 // show clipboard
1403 if (strtolower($_GET["baseClass"]) == "ilrepositorygui" && !empty($_SESSION["clipboard"])) {
1404 $this->tabs_gui->addTarget(
1405 "clipboard",
1406 $this->ctrl->getLinkTarget($this, "clipboard"),
1407 "clipboard",
1408 get_class($this)
1409 );
1410 }
1411 }

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

◆ getTreeSelectorGUI()

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

Reimplemented in ilObjOrgUnitGUI.

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

3664 {
3665 include_once("./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
3666 $exp = new ilRepositorySelectorExplorerGUI($this, "showPasteTree");
3667 // TODO: The study programme 'prg' is not included here, as the
3668 // ilRepositorySelectorExplorerGUI only handles static rules for
3669 // parent-child-relations and not the dynamic relationsships
3670 // required for the SP (see #16909).
3671 $exp->setTypeWhiteList(array("root", "cat", "grp", "crs", "fold"));
3672
3673 // Not all types are allowed in the LearningSequence
3674 // Extend whitelist, if all selected types are possible subojects of LSO
3675 if (in_array($_SESSION["clipboard"]["cmd"], ["link", "cut"])) {
3676 $lso_types = array_keys($this->obj_definition->getSubObjects('lso'));
3677 $refs = $_SESSION["clipboard"]["ref_ids"];
3678 $allow_lso = true;
3679 foreach ($refs as $item_ref_id) {
3680 $type = ilObject::_lookupType($item_ref_id, true);
3681 if (!in_array($type, $lso_types)) {
3682 $allow_lso = false;
3683 }
3684 }
3685 if ($allow_lso) {
3686 $whitelist = $exp->getTypeWhiteList();
3687 $whitelist[] = 'lso';
3688 $exp->setTypeWhiteList($whitelist);
3689 }
3690 }
3691
3692 if ($cmd == "link") {
3693 $exp->setSelectMode("nodes", true);
3694 return $exp;
3695 } else {
3696 $exp->setSelectMode("nodes[]", false);
3697 return $exp;
3698 }
3699 }
Explorer for selecting repository items.

References $_SESSION, $type, and ilObject\_lookupType().

Referenced by showPasteTreeObject().

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

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

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

2152 {
2154
2155 // empty session on init
2156 $_SESSION['paste_copy_repexpand'] = array();
2157
2158 // copy opend nodes from repository explorer
2159 $_SESSION['paste_copy_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2160
2161 // open current position
2162 $path = $tree->getPathId((int) $_GET['ref_id']);
2163 foreach ((array) $path as $node_id) {
2164 if (!in_array($node_id, $_SESSION['paste_copy_repexpand'])) {
2165 $_SESSION['paste_copy_repexpand'][] = $node_id;
2166 }
2167 }
2168
2169 return $this->showPasteTreeObject();
2170 }
showPasteTreeObject()
Show paste tree.

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

2050 {
2052
2053 // empty session on init
2054 $_SESSION['paste_linked_repexpand'] = array();
2055
2056 // copy opend nodes from repository explorer
2057 $_SESSION['paste_linked_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2058
2059 // open current position
2060 $path = $tree->getPathId((int) $_GET['ref_id']);
2061 foreach ((array) $path as $node_id) {
2062 if (!in_array($node_id, $_SESSION['paste_linked_repexpand'])) {
2063 $_SESSION['paste_linked_repexpand'][] = $node_id;
2064 }
2065 }
2066
2067 return $this->showPasteTreeObject();
2068 }

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

2174 {
2176
2177 // empty session on init
2178 $_SESSION['paste_cut_repexpand'] = array();
2179
2180 // copy opend nodes from repository explorer
2181 $_SESSION['paste_cut_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2182
2183 // open current position
2184 $path = $tree->getPathId((int) $_GET['ref_id']);
2185 foreach ((array) $path as $node_id) {
2186 if (!in_array($node_id, $_SESSION['paste_cut_repexpand'])) {
2187 $_SESSION['paste_cut_repexpand'][] = $node_id;
2188 }
2189 }
2190
2191 return $this->showPasteTreeObject();
2192 }

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

Referenced by cutObject().

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

◆ initEditForm()

ilContainerGUI::initEditForm ( )
protected

Init object edit form.

Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjFolderGUI, and ilObjRootFolderGUI.

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

3245 {
3246 $lng = $this->lng;
3247 $ilCtrl = $this->ctrl;
3248
3249 $lng->loadLanguageModule($this->object->getType());
3250
3251 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3252 $form = new ilPropertyFormGUI();
3253 $form->setFormAction($this->ctrl->getFormAction($this, "update"));
3254 $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
3255
3256 $this->initFormTitleDescription($form);
3257
3258 $this->initEditCustomForm($form);
3259
3260 $form->addCommandButton("update", $this->lng->txt("save"));
3261 //$this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
3262
3263 return $form;
3264 }
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
This class represents a property form user interface.

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, and ilObjectGUI\initEditCustomForm().

+ Here is the call graph for this function:

◆ initFilter()

ilContainerGUI::initFilter ( )
protected

Init filter.

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

3713 {
3714 global $DIC;
3715
3716
3717 if (!$this->object || !ilContainer::_lookupContainerSetting($this->object->getId(), "filter", false)) {
3718 return;
3719 }
3720
3721 $filter_service = $this->container_filter_service;
3722 $request = $DIC->http()->request();
3723
3724 $filter = $filter_service->util()->getFilterForRefId(
3725 $this->ref_id,
3726 $DIC->ctrl()->getLinkTarget($this, "render", "", true),
3727 (bool) $this->isActiveAdministrationPanel()
3728 );
3729
3730
3731 $filter_data = $DIC->uiService()->filter()->getData($filter);
3732
3733
3734 $this->container_user_filter = $filter_service->userFilter($filter_data);
3735 $this->ui_filter = $filter;
3736 }

References $container_filter_service, $DIC, ilObjectGUI\$request, and ilContainer\_lookupContainerSetting().

Referenced by __construct().

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

3108 {
3109 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3110 $this->form = new ilPropertyFormGUI();
3111 $this->form->setFormAction($this->ctrl->getFormAction($this));
3112
3113 // new password
3114 $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
3115 $ipass->setRequired(true);
3116
3117 $this->form->addItem($ipass);
3118 $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
3119 $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
3120
3121 $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
3122 $this->form->setFormAction($this->ctrl->getFormAction($this));
3123
3124 return $this->form;
3125 }
This class represents a password property in a property 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, ilObjGroupGUI, and ilObjStudyProgrammeGUI.

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

3207 {
3208 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3209
3210 return $lg;
3211 }

◆ initListPresentationForm()

ilContainerGUI::initListPresentationForm ( ilPropertyFormGUI  $form)
protected

Add list presentation settings to form.

Parameters
ilPropertyFormGUI$form
Returns
ilPropertyFormGUI

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

3379 {
3380 $lpres = new ilRadioGroupInputGUI($this->lng->txt('cont_list_presentation'), "list_presentation");
3381
3382 $item_list = new ilRadioOption($this->lng->txt('cont_item_list'), "");
3383 $item_list->setInfo($this->lng->txt('cont_item_list_info'));
3384 $lpres->addOption($item_list);
3385
3386 $tile_view = new ilRadioOption($this->lng->txt('cont_tile_view'), "tile");
3387 $tile_view->setInfo($this->lng->txt('cont_tile_view_info'));
3388 $lpres->addOption($tile_view);
3389
3390 $lpres->setValue(
3391 ilContainer::_lookupContainerSetting($this->object->getId(), "list_presentation")
3392 );
3393
3394 $form->addItem($lpres);
3395
3396 return $form;
3397 }
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
This class represents an option in a radio group.

References ilContainer\_lookupContainerSetting(), and ilPropertyFormGUI\addItem().

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

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

◆ initManualSortingOptionForm()

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

Add manual sorting options.

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

3456 {
3457 $position = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_position'), $a_prefix . '_new_items_position');
3458 $position->setValue($settings->getSortNewItemsPosition());
3459 $position->setRequired(true);
3460
3461 //new items insert on top
3462 $new_top = new ilRadioOption(
3463 $this->lng->txt('sorting_new_items_at_top'),
3465 );
3466
3467 $position->addOption($new_top);
3468
3469 //new items insert at bottom
3470 $new_bottom = new ilRadioOption(
3471 $this->lng->txt('sorting_new_items_at_bottom'),
3473 );
3474
3475 $position->addOption($new_bottom);
3476
3477 $element->addSubItem($position);
3478
3479 $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'), $a_prefix . '_new_items_order');
3480 $order->setValue($settings->getSortNewItemsOrder());
3481 $order->setRequired(true);
3482
3483 if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
3484 //new items sort in alphabetical order
3485 $new_title = new ilRadioOption(
3486 $this->lng->txt('sorting_title_header'),
3488 );
3489
3490 $order->addOption($new_title);
3491 }
3492
3493 if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
3494 //new items sort by creation date
3495 $new_creation = new ilRadioOption(
3496 $this->lng->txt('sorting_creation_header'),
3498 );
3499
3500 $order->addOption($new_creation);
3501 }
3502
3503
3504 if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
3505 //new items by activation
3506 $new_activation = new ilRadioOption(
3507 $this->lng->txt('crs_sort_activation'),
3509 );
3510
3511 $order->addOption($new_activation);
3512 }
3513
3514 $element->addSubItem($order);
3515
3516 $this->initSortingDirectionForm($settings, $element, 'manual');
3517
3518 return $element;
3519 }
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

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

3417 {
3418 if ($a_prefix == 'manual') {
3419 $txt = $this->lng->txt('sorting_new_items_direction');
3420 } else {
3421 $txt = $this->lng->txt('sorting_direction');
3422 }
3423
3424 $direction = new ilRadioGroupInputGUI($txt, $a_prefix . '_sorting_direction');
3425 $direction->setValue($sorting_settings->getSortDirection());
3426 $direction->setRequired(true);
3427
3428 // asc
3429 $asc = new ilRadioOption(
3430 $this->lng->txt('sorting_asc'),
3432 );
3433 $direction->addOption($asc);
3434
3435 // desc
3436 $desc = new ilRadioOption(
3437 $this->lng->txt('sorting_desc'),
3439 );
3440 $direction->addOption($desc);
3441
3442 $element->addSubItem($direction);
3443
3444 return $element;
3445 }
$txt
Definition: error.php:13

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

3309 {
3310 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3311 include_once './Services/Container/classes/class.ilContainer.php';
3312
3313 $settings = new ilContainerSortingSettings($this->object->getId());
3314 $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
3315
3316 if (in_array(ilContainer::SORT_INHERIT, $a_sorting_settings)) {
3317 $sort_inherit = new ilRadioOption();
3318 $sort_inherit->setTitle(
3319 $this->lng->txt('sort_inherit_prefix') .
3322 $this->object->getId()
3323 )
3324 ) . ') '
3325 );
3326 $sort_inherit->setValue(ilContainer::SORT_INHERIT);
3327 $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
3328 $sort->addOption($sort_inherit);
3329 }
3330 if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
3331 $sort_title = new ilRadioOption(
3332 $this->lng->txt('sorting_title_header'),
3334 );
3335 $sort_title->setInfo($this->lng->txt('sorting_info_title'));
3336
3337 $this->initSortingDirectionForm($settings, $sort_title, 'title');
3338 $sort->addOption($sort_title);
3339 }
3340 if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
3341 $sort_activation = new ilRadioOption($this->lng->txt('sorting_creation_header'), ilContainer::SORT_CREATION);
3342 $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
3343 $this->initSortingDirectionForm($settings, $sort_activation, 'creation');
3344 $sort->addOption($sort_activation);
3345 }
3346 if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
3347 $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'), ilContainer::SORT_ACTIVATION);
3348 $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
3349 $this->initSortingDirectionForm($settings, $sort_activation, 'activation');
3350 $sort->addOption($sort_activation);
3351 }
3352 if (in_array(ilContainer::SORT_MANUAL, $a_sorting_settings)) {
3353 $sort_manual = new ilRadioOption(
3354 $this->lng->txt('sorting_manual_header'),
3356 );
3357 $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
3358 $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
3359 $sort->addOption($sort_manual);
3360 }
3361
3362 // Handle moved containers and there possibly invalid values
3363 if (in_array($settings->getSortMode(), $a_sorting_settings)) {
3364 $sort->setValue($settings->getSortMode());
3365 } else {
3366 $sort->setValue(ilContainer::SORT_TITLE);
3367 }
3368 $form->addItem($sort);
3369
3370 return $form;
3371 }
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 $settings, ilPropertyFormGUI\addItem(), initManualSortingOptionForm(), initSortingDirectionForm(), ilContainerSortingSettings\lookupSortModeFromParentContainer(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, and ilContainerSortingSettings\sortModeToString().

Referenced by ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilObjFolderGUI\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 2869 of file class.ilContainerGUI.php.

2870 {
2871 $ilCtrl = $this->ctrl;
2872 $lng = $this->lng;
2873 $ilTabs = $this->tabs;
2875 $tpl = $this->tpl;
2876
2877 $tpl->setTreeFlatIcon("", "");
2878 $ilTabs->clearTargets();
2880 $this->object->getId(),
2881 "xhtml_page"
2882 );
2883 if ($xpage_id > 0) {
2884 $ilTabs->setBackTarget(
2885 $lng->txt("cntr_back_to_old_editor"),
2886 $ilCtrl->getLinkTarget($this, "switchToOldEditor"),
2887 "_top"
2888 );
2889 } else {
2890 $ilTabs->setBackTarget(
2891 $lng->txt("back"),
2892 $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "edit")
2893 );
2894 }
2895
2896 include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
2897 $page_gui = new ilContainerPageGUI($this->object->getId());
2898 $style_id = $this->object->getStyleSheetId();
2899 if (ilObject::_lookupType($style_id) == "sty") {
2900 $page_gui->setStyleId($style_id);
2901 } else {
2902 $style_id = 0;
2903 }
2904 $page_gui->setTabHook($this, "addPageTabs");
2905 $ilCtrl->getHTML($page_gui);
2906 $ilTabs->setTabActive("obj_sty");
2907
2908 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
2909 $lng->loadLanguageModule("style");
2910
2911 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
2912 $this->form = new ilPropertyFormGUI();
2913
2914 $fixed_style = $ilSetting->get("fixed_content_style_id");
2915 // $style_id = $this->object->getStyleSheetId();
2916
2917 if ($fixed_style > 0) {
2918 $st = new ilNonEditableValueGUI($lng->txt("wiki_current_style"));
2919 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
2920 $this->lng->txt("global_fixed") . ")");
2921 $this->form->addItem($st);
2922 } else {
2924 true,
2925 false,
2926 $_GET["ref_id"]
2927 );
2928
2929 $st_styles[0] = $this->lng->txt("default");
2930 ksort($st_styles);
2931
2932 if ($style_id > 0) {
2933 // individual style
2934 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
2935 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
2936 $st->setValue(ilObject::_lookupTitle($style_id));
2937 $this->form->addItem($st);
2938
2939 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
2940
2941 // delete command
2942 $this->form->addCommandButton(
2943 "editStyle",
2944 $lng->txt("style_edit_style")
2945 );
2946 $this->form->addCommandButton(
2947 "deleteStyle",
2948 $lng->txt("style_delete_style")
2949 );
2950 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
2951 }
2952 }
2953
2954 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
2955 $style_sel = ilUtil::formSelect(
2956 $style_id,
2957 "style_id",
2958 $st_styles,
2959 false,
2960 true
2961 );
2962 $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
2963 $style_sel->setOptions($st_styles);
2964 $style_sel->setValue($style_id);
2965 $this->form->addItem($style_sel);
2966 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
2967 $this->form->addCommandButton(
2968 "saveStyleSettings",
2969 $lng->txt("save")
2970 );
2971 $this->form->addCommandButton(
2972 "createStyle",
2973 $lng->txt("sty_create_ind_style")
2974 );
2975 }
2976 }
2977 $this->form->setTitle($lng->txt("obj_sty"));
2978 $this->form->setFormAction($ilCtrl->getFormAction($this));
2979 }
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, $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 ( )

Reimplemented in ilObjStudyProgrammeGUI.

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

2494 {
2495 // #10081
2496 if ($_SESSION["il_cont_admin_panel"] &&
2497 $this->object->getRefId() &&
2498 !$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
2499 return false;
2500 }
2501
2502 return $_SESSION["il_cont_admin_panel"];
2503 }

References $_SESSION.

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

+ Here is the caller graph for this function:

◆ isActiveItemOrdering()

ilContainerGUI::isActiveItemOrdering ( )

Check if item ordering is enabled.

Returns
bool

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

1464 {
1465 if ($this->isActiveOrdering()) {
1467 }
1468 return false;
1469 }
isActiveOrdering()
Check if ordering is enabled.
static _lookupSortMode($a_obj_id)
lookup sort mode

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

1455 {
1456 return $this->edit_order ? true : false;
1457 }
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.

References true.

Referenced by isActiveItemOrdering(), renderObject(), showAdministrationPanel(), and showPossibleSubObjects().

+ Here is the caller graph for this function:

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

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

1482 {
1484 }

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

2143 {
2144 $ilCtrl = $this->ctrl;
2145
2146 ilUtil::sendSuccess($this->lng->txt("obj_inserted_clipboard"), true);
2147 $ilCtrl->returnToParent($this);
2148 }

References ilObjectGUI\$ctrl.

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

+ Here is the caller 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 1681 of file class.ilContainerGUI.php.

1682 {
1684 $ilCtrl = $this->ctrl;
1686
1687 $no_cut = [];
1688 $no_link = [];
1689
1690 if ($_GET["item_ref_id"] != "") {
1691 $_POST["id"] = array($_GET["item_ref_id"]);
1692 }
1693
1694 if (!isset($_POST["id"])) {
1695 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1696 }
1697
1698 // CHECK ACCESS
1699 foreach ($_POST["id"] as $ref_id) {
1700 if (!$rbacsystem->checkAccess('delete', $ref_id)) {
1701 $no_cut[] = $ref_id;
1702 }
1703
1705
1706 if (!$this->objDefinition->allowLink($object->getType())) {
1707 $no_link[] = $object->getType();
1708 }
1709 }
1710
1711 // NO ACCESS
1712 if (count($no_cut)) {
1713 $ilErr->raiseError($this->lng->txt("msg_no_perm_link") . " " .
1714 implode(',', $no_cut), $ilErr->MESSAGE);
1715 }
1716
1717 if (count($no_link)) {
1718 //#12203
1719 $ilErr->raiseError($this->lng->txt("msg_obj_no_link"), $ilErr->MESSAGE);
1720 }
1721
1722 // WRITE TO CLIPBOARD
1723 $clipboard["parent"] = $_GET["ref_id"];
1724 $clipboard["cmd"] = $ilCtrl->getCmd();
1725
1726 foreach ($_POST["id"] as $ref_id) {
1727 $clipboard["ref_ids"][] = $ref_id;
1728 }
1729
1730 $_SESSION["clipboard"] = $clipboard;
1731
1732 $suffix = 'p';
1733 if (count($clipboard["ref_ids"]) == 1) {
1734 $suffix = 's';
1735 }
1736 ilUtil::sendInfo($this->lng->txt("msg_link_clipboard_" . $suffix), true);
1737
1739 } // END LINK

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

Referenced by ilObjLearningSequenceGUI\executeCommand().

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

◆ modifyItemGUI()

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

Modify list gui for presentation in container.

Parameters
type$a_item_list_gui
type$a_item_data
type$a_show_path

Reimplemented in ilObjCourseGUI, ilObjFolderGUI, and ilObjGroupGUI.

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

2812 {
2813 $lng = $this->lng;
2814
2815 if ($a_show_path) {
2816 $a_item_list_gui->addCustomProperty(
2817 $lng->txt('path'),
2818 ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
2819 false,
2820 true
2821 );
2822 }
2823 }

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

1165 {
1166 $tpl = new ilTemplate(
1167 "tpl.container_list_block.html",
1168 true,
1169 true,
1170 "Services/Container"
1171 );
1172 $this->cur_row_type = "row_type_1";
1173 return $tpl;
1174 }

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

2202 {
2205 $ilLog = $this->log;
2208 $ilCtrl = $this->ctrl;
2210
2211 $exists = [];
2212 $no_paste = [];
2213 $is_child = [];
2214 $not_allowed_subobject = [];
2215
2216 // BEGIN ChangeEvent: Record paste event.
2217 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
2218 // END ChangeEvent: Record paste event.
2219
2220 //var_dump($_SESSION["clipboard"]);exit;
2221 if (!in_array($_SESSION["clipboard"]["cmd"], array("cut","link","copy"))) {
2222 $message = get_class($this) . "::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2223 $ilErr->raiseError($message, $ilErr->WARNING);
2224 }
2225
2226 // this loop does all checks
2227 foreach ($_SESSION["clipboard"]["ref_ids"] as $ref_id) {
2229
2230 // CHECK ACCESS
2231 if (!$rbacsystem->checkAccess('create', $this->object->getRefId(), $obj_data->getType())) {
2232 $no_paste[] = $ref_id;
2233 $no_paste_titles[] = $obj_data->getTitle();
2234 }
2235
2236 // CHECK IF REFERENCE ALREADY EXISTS
2237 if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId())) {
2238 $exists[] = $ref_id;
2239 break;
2240 }
2241
2242 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
2243 if ($this->tree->isGrandChild($ref_id, $this->object->getRefId())) {
2245 }
2246
2247 if ($ref_id == $this->object->getRefId()) {
2249 }
2250
2251 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
2252 $obj_type = $obj_data->getType();
2253
2254 if (!in_array($obj_type, array_keys($this->object->getPossibleSubObjects()))) {
2255 $not_allowed_subobject[] = $obj_data->getType();
2256 }
2257 }
2258
2260 // process checking results
2261 // BEGIN WebDAV: Copying an object into the same container is allowed
2262 if (count($exists) > 0 && $_SESSION["clipboard"]["cmd"] != "copy") {
2263 // END WebDAV: Copying an object into the same container is allowed
2264 $ilErr->raiseError($this->lng->txt("msg_obj_exists"), $ilErr->MESSAGE);
2265 }
2266
2267 if (count($is_child) > 0) {
2268 $ilErr->raiseError(
2269 $this->lng->txt("msg_not_in_itself") . " " . implode(',', $is_child),
2270 $ilErr->MESSAGE
2271 );
2272 }
2273
2274 if (count($not_allowed_subobject) > 0) {
2275 $ilErr->raiseError(
2276 $this->lng->txt("msg_may_not_contain") . " " . implode(',', $not_allowed_subobject),
2277 $ilErr->MESSAGE
2278 );
2279 }
2280
2281 if (count($no_paste) > 0) {
2282 $ilErr->raiseError($this->lng->txt("msg_no_perm_paste") . " " .
2283 implode(',', $no_paste), $ilErr->MESSAGE);
2284 }
2285
2286 // log pasteObject call
2287 $ilLog->write("ilObjectGUI::pasteObject(), cmd: " . $_SESSION["clipboard"]["cmd"]);
2288
2290 // everything ok: now paste the objects to new location
2291
2292 // to prevent multiple actions via back/reload button
2293 $ref_ids = $_SESSION["clipboard"]["ref_ids"];
2294 unset($_SESSION["clipboard"]["ref_ids"]);
2295
2296 // BEGIN WebDAV: Support a copy command in the repository
2297 // process COPY command
2298 if ($_SESSION["clipboard"]["cmd"] == "copy") {
2299 unset($_SESSION["clipboard"]["cmd"]);
2300
2301 // new implementation, redirects to ilObjectCopyGUI
2302 if (count($ref_ids) == 1) {
2303 $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2304 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $ref_ids[0]);
2305 $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2306 } else {
2307 $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2308 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode("_", $ref_ids));
2309 $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2310 }
2311
2312
2313
2314 /* old implementation
2315
2316 foreach($ref_ids as $ref_id)
2317 {
2318 $revIdMapping = array();
2319
2320 $oldNode_data = $tree->getNodeData($ref_id);
2321 if ($oldNode_data['parent'] == $this->object->getRefId())
2322 {
2323 require_once 'Modules/File/classes/class.ilObjFileAccess.php';
2324 $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'],null);
2325 $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, $newTitle);
2326 }
2327 else
2328 {
2329 $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, null);
2330 }
2331
2332 // BEGIN ChangeEvent: Record copy event.
2333 $old_parent_data = $tree->getParentNodeData($ref_id);
2334 $newNode_data = $tree->getNodeData($newRef);
2335 ilChangeEvent::_recordReadEvent($oldNode_data['type'], $ref_id,
2336 $oldNode_data['obj_id'], $ilUser->getId());
2337 ilChangeEvent::_recordWriteEvent($newNode_data['obj_id'], $ilUser->getId(), 'add',
2338 $this->object->getId());
2339 ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
2340 // END ChangeEvent: Record copy event.
2341 }*/
2342
2343 $ilLog->write("ilObjectGUI::pasteObject(), copy finished");
2344 }
2345 // END WebDAV: Support a Copy command in the repository
2346
2347 // process CUT command
2348 if ($_SESSION["clipboard"]["cmd"] == "cut") {
2349 foreach ($ref_ids as $ref_id) {
2350 // Store old parent
2351 $old_parent = $tree->getParentId($ref_id);
2352 $this->tree->moveTree($ref_id, $this->object->getRefId());
2353 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
2354
2355 include_once('./Services/Conditions/classes/class.ilConditionHandler.php');
2357
2358 // BEGIN ChangeEvent: Record cut event.
2359 $node_data = $tree->getNodeData($ref_id);
2360 $old_parent_data = $tree->getNodeData($old_parent);
2362 $node_data['obj_id'],
2363 $ilUser->getId(),
2364 'remove',
2365 $old_parent_data['obj_id']
2366 );
2368 $node_data['obj_id'],
2369 $ilUser->getId(),
2370 'add',
2371 $this->object->getId()
2372 );
2373 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2374 // END PATCH ChangeEvent: Record cut event.
2375 }
2376 } // END CUT
2377
2378 // process LINK command
2379 if ($_SESSION["clipboard"]["cmd"] == "link") {
2380 foreach ($ref_ids as $ref_id) {
2381 // get node data
2382 $top_node = $this->tree->getNodeData($ref_id);
2383
2384 // get subnodes of top nodes
2385 $subnodes[$ref_id] = $this->tree->getSubtree($top_node);
2386 }
2387
2388 // now move all subtrees to new location
2389 foreach ($subnodes as $key => $subnode) {
2390 // first paste top_node....
2392 $new_ref_id = $obj_data->createReference();
2393 $obj_data->putInTree($_GET["ref_id"]);
2394 $obj_data->setPermissions($_GET["ref_id"]);
2395
2396 // BEGIN ChangeEvent: Record link event.
2397 $node_data = $tree->getNodeData($new_ref_id);
2399 $node_data['obj_id'],
2400 $ilUser->getId(),
2401 'add',
2402 $this->object->getId()
2403 );
2404 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2405 // END PATCH ChangeEvent: Record link event.
2406 }
2407
2408 $ilLog->write("ilObjectGUI::pasteObject(), link finished");
2409 } // END LINK
2410
2411 // save cmd for correct message output after clearing the clipboard
2412 $last_cmd = $_SESSION["clipboard"]["cmd"];
2413
2414
2415 // clear clipboard
2416 $this->clearObject();
2417
2418 if ($last_cmd == "cut") {
2419 ilUtil::sendSuccess($this->lng->txt("msg_cut_copied"), true);
2420 }
2421 // BEGIN WebDAV: Support a copy command in repository
2422 elseif ($last_cmd == "copy") {
2423 ilUtil::sendSuccess($this->lng->txt("msg_cloned"), true);
2424 } elseif ($last_cmd == 'link') {
2425 // END WebDAV: Support copy command in repository
2426 ilUtil::sendSuccess($this->lng->txt("msg_linked"), true);
2427 }
2428
2429 $this->ctrl->returnToParent($this);
2430 } // 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

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

Referenced by ilObjOrgUnitGUI\performPaste().

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

◆ performPasteIntoMultipleObjectsObject()

ilContainerGUI::performPasteIntoMultipleObjectsObject ( )

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

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

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

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

491 {
492 if (parent::prepareOutput($a_show_subobjects)) { // return false in admin mode
493 if ($this->getCreationMode() != true && $a_show_subobjects) {
494 // This method is called directly from ilContainerGUI::renderObject
495 #$this->showPossibleSubObjects();
496 $this->showTreeFlatIcon();
497
498 // Member view
499 include_once './Services/Container/classes/class.ilMemberViewGUI.php';
500 ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
501 }
502 }
503 }
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:

◆ redrawListItemObject()

ilContainerGUI::redrawListItemObject ( )

Redraw a list item (ajax)

Parameters

return

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

3153 {
3154 $tpl = $this->tpl;
3155
3156 $html = null;
3157
3158 $item_data = $this->object->getSubItems(false, false, (int) $_GET["child_ref_id"]);
3159 $container_view = $this->getContentGUI();
3160
3161 // list item is session material (not part of "_all"-items - see below)
3162 include_once './Modules/Session/classes/class.ilEventItems.php';
3163 $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
3164 if (in_array((int) $_GET["child_ref_id"], $event_items)) {
3165 include_once('./Services/Object/classes/class.ilObjectActivation.php');
3166 foreach ($this->object->items["sess"] as $id) {
3167 $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
3168 foreach ($items as $event_item) {
3169 if ($event_item["child"] == (int) $_GET["child_ref_id"]) {
3170 // sessions
3171 if ((int) $_GET["parent_ref_id"]) {
3172 $event_item["parent"] = (int) $_GET["parent_ref_id"];
3173 }
3174 $html = $container_view->renderItem($event_item);
3175 }
3176 }
3177 }
3178 }
3179
3180 // "normal" list item
3181 if (!$html) {
3182 foreach ($this->object->items["_all"] as $id) {
3183 if ($id["child"] == (int) $_GET["child_ref_id"]) {
3184 $html = $container_view->renderItem($id);
3185 }
3186 }
3187 }
3188
3189 if ($html) {
3190 echo $html;
3191
3192 // we need to add onload code manually (rating, comments, etc.)
3193 echo $tpl->getOnLoadCodeForAsynch();
3194 }
3195
3196 exit;
3197 }
getContentGUI()
Get content gui object.
static _getItemsOfContainer($a_ref_id)
static getItemsByEvent($a_event_id)
Get session material / event items.

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

+ Here is the call graph for this function:

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

3612 {
3613 $this->checkPermission("write");
3614 $ru = new ilRepUtilGUI($this);
3615 $ru->removeObjectsFromSystem($_POST["trash_id"]);
3616 $this->ctrl->redirect($this, "trash");
3617 }

References $_POST, and ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ renderBlockAsynchObject()

ilContainerGUI::renderBlockAsynchObject ( )

render the object

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

671 {
672 $container_view = $this->getContentGUI();
673 echo $container_view->getSingleTypeBlockAsynch($_GET["type"]);
674 exit;
675 }

References $_GET, exit, and getContentGUI().

+ Here is the call graph for this function:

◆ renderObject()

ilContainerGUI::renderObject ( )

render the object

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

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

608 {
609 $ilTabs = $this->tabs;
610 $ilCtrl = $this->ctrl;
615
616 $container_view = $this->getContentGUI();
617
618 $this->setContentSubTabs();
619 if ($this->isActiveAdministrationPanel()) {
620 $ilTabs->activateSubTab("manage");
621 } else {
622 $ilTabs->activateSubTab("view_content");
623 }
624
625 $container_view->setOutput();
626
627 $this->adminCommands = $container_view->adminCommands;
628
629 // it is important not to show the subobjects/admin panel here, since
630 // we will create nested forms in case, e.g. a news/calendar item is added
631 if ($ilCtrl->getNextClass() != "ilcolumngui") {
633 $this->showPossibleSubObjects();
634
635 if ($user->getId() != ANONYMOUS_USER_ID &&
636 is_object($this->object) &&
637 $this->rbacsystem->checkAccess("write", $this->object->getRefId())
638 ) {
639 if ($ilSetting->get("enable_cat_page_edit")) {
640 if (!$this->isActiveAdministrationPanel() &&
641 !$this->isActiveOrdering() &&
642 $this->supportsPageEditor()) {
643 $toolbar->addButton(
644 $lng->txt("cntr_text_media_editor"),
645 $ilCtrl->getLinkTarget($this, "editPageFrame")
646 );
647 }
648 }
649 }
650 }
651
652 $this->showContainerFilter();
653
654 $this->showPermanentLink();
655
656 // add tree updater javascript
657 if ((int) $_GET["ref_id"] > 1 && $ilSetting->get("rep_tree_synchronize")) {
658 $ilCtrl->setParameter($this, "active_node", (int) $_GET["ref_id"]);
659 }
660 }
setContentSubTabs()
Set content sub tabs.
showPermanentLink()
show permanent link
showPossibleSubObjects()
show possible sub objects selection list
showAdministrationPanel()
show administration panel

References $_GET, ilObjectGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, $settings, $tabs, $toolbar, $user, ANONYMOUS_USER_ID, getContentGUI(), isActiveAdministrationPanel(), isActiveOrdering(), setContentSubTabs(), showAdministrationPanel(), showPermanentLink(), showPossibleSubObjects(), and supportsPageEditor().

Referenced by editOrderObject(), and enableMultiDownloadObject().

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

◆ resetRowType()

ilContainerGUI::resetRowType ( )

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

1296 {
1297 $this->cur_row_type = "";
1298 }

◆ restoreToNewLocationObject()

ilContainerGUI::restoreToNewLocationObject ( \ilPropertyFormGUI  $form = null)
protected
Parameters
\ilPropertyFormGUI | null$form

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

3623 {
3624 $this->tabs_gui->activateTab('trash');
3625
3626 $ru = new \ilRepUtilGUI($this);
3627 $ru->restoreToNewLocation();
3628 }

◆ saveListPresentation()

ilContainerGUI::saveListPresentation ( ilPropertyFormGUI  $form)
protected

Save list presentation setting.

Parameters
ilPropertyFormGUI$form

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

3404 {
3405 $val = ($form->getInput('list_presentation') == "tile")
3406 ? "tile"
3407 : "";
3408 ilContainer::_writeContainerSetting($this->object->getId(), "list_presentation", $val);
3409 }
static _writeContainerSetting($a_id, $a_keyword, $a_value)
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

References ilContainer\_writeContainerSetting(), and ilPropertyFormGUI\getInput().

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

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

◆ savePageContentObject()

ilContainerGUI::savePageContentObject ( )

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

1030 {
1031 include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
1032 include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
1034 $this->object->getId(),
1035 "xhtml_page"
1036 );
1037
1038 /*include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
1039 include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
1040 $ta = new ilTextAreaInputGUI();
1041 $ta->setRteTagSet("extended_table_img");
1042 $tags = $ta->getRteTagString();*/
1043
1044 //$text = ilUtil::stripSlashes($_POST["page_content"],
1045 // true,
1046 // $tags);
1047
1048 $text = ilUtil::stripSlashes(
1049 $_POST["page_content"],
1050 true,
1052 );
1053 if ($xpage_id > 0) {
1054 $xpage = new ilXHTMLPage($xpage_id);
1055 $xpage->setContent($text);
1056 $xpage->save();
1057 } else {
1058 $xpage = new ilXHTMLPage();
1059 $xpage->setContent($text);
1060 $xpage->save();
1062 $this->object->getId(),
1063 "xhtml_page",
1064 $xpage->getId()
1065 );
1066 }
1067
1068 include_once("Services/RTE/classes/class.ilRTE.php");
1070 $text,
1071 $this->object->getType() . ":html",
1072 $this->object->getId()
1073 );
1074
1075 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1076 $this->ctrl->redirect($this, "");
1077 }
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

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

+ Here is the call graph for this function:

◆ savePasswordObject()

ilContainerGUI::savePasswordObject ( )
protected

Save password.

Returns

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

3132 {
3134
3135 $form = $this->initFormPasswordInstruction();
3136 if ($form->checkInput()) {
3137 $ilUser->resetPassword($this->form->getInput('new_password'), $this->form->getInput('new_password'));
3138 ilUtil::sendSuccess($this->lng->txt('webdav_pwd_instruction_success'), true);
3139 $this->showPasswordInstructionObject(false);
3140 return true;
3141 }
3142 $form->setValuesByPost();
3144 }
initFormPasswordInstruction()
Init password form.
showPasswordInstructionObject($a_init=true)
Show webdav password instruction.

References $ilUser, $user, initFormPasswordInstruction(), and showPasswordInstructionObject().

+ Here is the call graph for this function:

◆ saveSortingObject()

ilContainerGUI::saveSortingObject ( )

Save Sorting.

@access public

Parameters

Reimplemented in ilObjCourseGUI.

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

2742 {
2743 include_once('Services/Container/classes/class.ilContainerSorting.php');
2744 $sorting = ilContainerSorting::_getInstance($this->object->getId());
2745
2746 // Allow comma
2747 $positions = str_replace(',', '.', $_POST['position']);
2748
2749 $sorting->savePost($positions);
2750 ilUtil::sendSuccess($this->lng->txt('cntr_saved_sorting'), true);
2751 $this->ctrl->redirect($this, "editOrder");
2752 }
static _getInstance($a_obj_id)
get instance by obj_id

References $_POST, and ilContainerSorting\_getInstance().

+ Here is the call graph for this function:

◆ saveSortingSettings()

ilContainerGUI::saveSortingSettings ( ilPropertyFormGUI  $form)
protected

Save sorting settings.

Parameters
ilPropertyFormGUI$form

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

3526 {
3527 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3528 $settings = new ilContainerSortingSettings($this->object->getId());
3529 $settings->setSortMode($form->getInput("sorting"));
3530
3531 switch ($form->getInput('sorting')) {
3533 $settings->setSortDirection($form->getInput('title_sorting_direction'));
3534 break;
3536 $settings->setSortDirection($form->getInput('activation_sorting_direction'));
3537 break;
3539 $settings->setSortDirection($form->getInput('creation_sorting_direction'));
3540 break;
3542 $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
3543 $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
3544 $settings->setSortDirection($form->getInput('manual_sorting_direction'));
3545 break;
3546 }
3547
3548 $settings->update();
3549 }

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

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

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

◆ saveStyleSettingsObject()

ilContainerGUI::saveStyleSettingsObject ( )

Save style settings.

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

3015 {
3017
3018 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3019 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
3020 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
3021 || $this->object->getStyleSheetId() == 0)) {
3022 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
3023 $this->object->update();
3024 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
3025 }
3026 $this->ctrl->redirect($this, "editStyleProperties");
3027 }

References $_POST, $ilSetting, $settings, ilObjStyleSheet\_lookupStandard(), 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 2508 of file class.ilContainerGUI.php.

2509 {
2510 $ilAccess = $this->access;
2511 parent::setColumnSettings($column_gui);
2512
2513 $column_gui->setRepositoryItems(
2514 $this->object->getSubItems($this->isActiveAdministrationPanel(), true)
2515 );
2516
2517 //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
2518 // && $this->allowBlocksConfigure())
2519 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
2520 $column_gui->setBlockProperty("news", "settings", true);
2521 //$column_gui->setBlockProperty("news", "public_notifications_option", true);
2522 $column_gui->setBlockProperty("news", "default_visibility_option", true);
2523 $column_gui->setBlockProperty("news", "hide_news_block_option", true);
2524 }
2525
2526 if ($this->isActiveAdministrationPanel()) {
2527 $column_gui->setAdminCommands(true);
2528 }
2529 }
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...
setRepositoryItems($a_repositoryitems)
Set Repository Items.
setAdminCommands($a_admincommands)
Set Administration Commmands.

References $access, isActiveAdministrationPanel(), ilColumnGUI\setAdminCommands(), ilColumnGUI\setBlockProperty(), 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 681 of file class.ilContainerGUI.php.

682 {
684 }
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 1304 of file class.ilContainerGUI.php.

1305 {
1306 $lng = $this->lng;
1307
1308 if (!$this->isActiveAdministrationPanel()
1309 || strtolower($this->ctrl->getCmdClass()) != "ilcontainerpagegui") {
1310 return;
1311 }
1312
1313 $lng->loadLanguageModule("content");
1314 //$tabs_gui = new ilTabsGUI();
1315 //$tabs_gui->setSubTabs();
1316
1317 // back to upper context
1318 $this->tabs_gui->setBackTarget(
1319 $this->lng->txt("obj_cat"),
1320 $this->ctrl->getLinkTarget($this, "frameset"),
1321 ilFrameTargetInfo::_getFrame("MainContent")
1322 );
1323
1324 $this->tabs_gui->addTarget("edit", $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "view"), array("", "view"), "ilcontainerpagegui");
1325
1326 //$this->tpl->setTabs($tabs_gui->getHTML());
1327 }
static _getFrame($a_class, $a_type='')
Get content frame name.

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

3705 {
3706 $this->ctrl->setReturn($this, "");
3707 }

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjOrgUnitGUI, and ilObjRootFolderGUI.

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

530 {
531 if (ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
532 $this->tpl->setTitle((string) $this->object->getTitle(), true);
533 } else {
534 $this->tpl->setTitle((string) $this->object->getTitle());
535 $this->tpl->setDescription($this->object->getLongDescription());
536
537 // set tile icon
538 $icon = ilObject::_getIcon($this->object->getId(), "big", $this->object->getType());
539 $this->tpl->setTitleIcon($icon, $this->lng->txt("obj_" . $this->object->getType()));
540
541 include_once './Services/Object/classes/class.ilObjectListGUIFactory.php';
542 $lgui = ilObjectListGUIFactory::_getListGUIByType($this->object->getType());
543 $lgui->initItem($this->object->getRefId(), $this->object->getId(), $this->object->getType());
544 $this->tpl->setAlertProperties($lgui->getAlertProperties());
545 }
546 }
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 ( )

show administration panel

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

690 {
691 global $DIC;
692
693 $ilAccess = $this->access;
695
696 $main_tpl = $DIC->ui()->mainTemplate();
697
698 $lng->loadLanguageModule('cntr');
699
700 if ($_SESSION["clipboard"] && !$this->edit_order) {
701 // #11545
702 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
703
704 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
705 $toolbar = new ilToolbarGUI();
706 $toolbar->setId("admclip");
707 $this->ctrl->setParameter($this, "type", "");
708 $this->ctrl->setParameter($this, "item_ref_id", "");
709
710 $toolbar->addFormButton(
711 $this->lng->txt('paste_clipboard_items'),
712 'paste'
713 );
714
715 $toolbar->addFormButton(
716 $this->lng->txt('clear_clipboard'),
717 'clear'
718 );
719
720 $main_tpl->addAdminPanelToolbar($toolbar, true, false);
721 } elseif ($this->isActiveAdministrationPanel()) {
722 // #11545
723 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
724
725 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
726 $toolbar = new ilToolbarGUI();
727 $toolbar->setId("adm");
728 $this->ctrl->setParameter($this, "type", "");
729 $this->ctrl->setParameter($this, "item_ref_id", "");
730
731 // if (!$_SESSION["clipboard"])
732 // {
733 if ($this->object->gotItems()) {
734 $toolbar->setLeadingImage(
735 ilUtil::getImagePath("arrow_upright.svg"),
736 $lng->txt("actions")
737 );
738 $toolbar->addFormButton(
739 $this->lng->txt('delete_selected_items'),
740 'delete'
741 );
742 $toolbar->addFormButton(
743 $this->lng->txt('move_selected_items'),
744 'cut'
745 );
746 $toolbar->addFormButton(
747 $this->lng->txt('copy_selected_items'),
748 'copy'
749 );
750 $toolbar->addFormButton(
751 $this->lng->txt('link_selected_items'),
752 'link'
753 );
754 // add download button if multi download enabled
755 $folder_set = new ilSetting('fold');
756 if ((bool) $folder_set->get('enable_multi_download') === true) {
757 $toolbar->addSeparator();
758 $toolbar->addFormButton(
759 $this->lng->txt('download_selected_items'),
760 'download'
761 );
762 }
763 }
764 if ($this->object->getType() == 'crs' or $this->object->getType() == 'grp') {
765 if ($this->object->gotItems()) {
766 $toolbar->addSeparator();
767 }
768
769 $toolbar->addButton(
770 $this->lng->txt('cntr_adopt_content'),
771 $this->ctrl->getLinkTargetByClass(
772 'ilObjectCopyGUI',
773 'adoptContent'
774 )
775 );
776 }
777 // }
778 /*else
779 {
780
781 if ($this->isMultiDownloadEnabled())
782 {
783 $toolbar->addSeparator();
784 $toolbar->addFormButton(
785 $this->lng->txt('download_selected_items'),
786 'download'
787 );
788 }
789 }*/
790
791 $main_tpl->addAdminPanelToolbar(
792 $toolbar,
793 ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false,
794 ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false
795 );
796
797 // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
798 if ($this->object->gotItems()) {
799 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
800 }
801 } else {
802 if ($this->edit_order) {
803 if ($this->object->gotItems() and $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
804 include_once('./Services/Container/classes/class.ilContainer.php');
805
806 if ($this->isActiveOrdering()) {
807 // #11843
808 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
809
810 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
811 $toolbar = new ilToolbarGUI();
812 $this->ctrl->setParameter($this, "type", "");
813 $this->ctrl->setParameter($this, "item_ref_id", "");
814
815 $toolbar->addFormButton(
816 $this->lng->txt('sorting_save'),
817 'saveSorting'
818 );
819
820 $main_tpl->addAdminPanelToolbar($toolbar, true, false);
821 }
822 }
823 }
824
825 // bugfix mantis 24559
826 // undoing an erroneous change inside mantis 23516 by adding "Download Multiple Objects"-functionality for non-admins
827 // as they don't have the possibility to use the multi-download-capability of the manage-tab
828 elseif ($this->isMultiDownloadEnabled()) {
829 // bugfix mantis 0021272
830 $ref_id = $_GET['ref_id'];
831 $num_files = $this->tree->getChildsByType($ref_id, "file");
832 $num_folders = $this->tree->getChildsByType($ref_id, "fold");
833 if (count($num_files) > 0 or count($num_folders) > 0) {
834 // #11843
835 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
836
837 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
838 $toolbar = new ilToolbarGUI();
839 $this->ctrl->setParameter($this, "type", "");
840 $this->ctrl->setParameter($this, "item_ref_id", "");
841
842 $toolbar->addFormButton(
843 $this->lng->txt('download_selected_items'),
844 'download'
845 );
846
847 $GLOBALS['tpl']->addAdminPanelToolbar(
848 $toolbar,
849 $this->object->gotItems() ? true : false,
850 $this->object->gotItems() ? true : false
851 );
852 } else {
853 ilUtil::sendInfo($this->lng->txt('msg_no_downloadable_objects'), true);
854 }
855 }
856 }
857 }
ILIAS Setting Class.

References $_GET, $_SESSION, $access, $DIC, $GLOBALS, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $toolbar, ilUtil\getImagePath(), 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:

◆ showLinkListObject()

ilContainerGUI::showLinkListObject ( )

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

1085 {
1086 $lng = $this->lng;
1088
1089 $tpl = new ilGlobalTemplate(
1090 "tpl.container_link_help.html",
1091 true,
1092 true,
1093 "Services/Container"
1094 );
1095
1096 $type_ordering = array(
1097 "cat", "fold", "crs", "grp", "chat", "frm", "lres",
1098 "glo", "webr", "file", "exc",
1099 "tst", "svy", "mep", "qpl", "spl");
1100
1101 $childs = $tree->getChilds($_GET["ref_id"]);
1102 foreach ($childs as $child) {
1103 if (in_array($child["type"], array("lm", "sahs", "htlm"))) {
1104 $cnt["lres"]++;
1105 } else {
1106 $cnt[$child["type"]]++;
1107 }
1108 }
1109
1110 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
1111 $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
1112 foreach ($type_ordering as $type) {
1113 $tpl->setCurrentBlock("row");
1114 $tpl->setVariable("ROWCOL", "tblrow" . ((($i++) % 2) + 1));
1115 if ($type != "lres") {
1116 $tpl->setVariable("TYPE", $lng->txt("objs_" . $type) .
1117 " (" . ((int) $cnt[$type]) . ")");
1118 } else {
1119 $tpl->setVariable("TYPE", $lng->txt("obj_lrss") .
1120 " (" . ((int) $cnt["lres"]) . ")");
1121 }
1122 $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
1123 $tpl->parseCurrentBlock();
1124 }
1125 $tpl->printToStdout();
1126 exit;
1127 }
special template class to simplify handling of ITX/PEAR
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 3081 of file class.ilContainerGUI.php.

3082 {
3083 global $DIC;
3084 $tpl = $this->tpl;
3085 $ilToolbar = $this->toolbar;
3086
3087 if ($a_init) {
3088 ilUtil::sendInfo($this->lng->txt('webdav_pwd_instruction'));
3090 }
3091
3092 $uri_builder = new ilWebDAVUriBuilder($DIC->http()->request());
3093 $href = $uri_builder->getUriToMountInstructionModalByRef($this->object->getRefId());
3094
3095 $btn = ilButton::getInstance();
3096 $btn->setCaption('mount_webfolder');
3097 $btn->setOnClick("triggerWebDAVModal('$href')");
3098 $ilToolbar->addButtonInstance($btn);
3099
3100 $tpl->setContent($this->form->getHTML());
3101 }
static getInstance()

References $DIC, $toolbar, ilObjectGUI\$tpl, ilButton\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 2073 of file class.ilContainerGUI.php.

2074 {
2075 $ilTabs = $this->tabs;
2076 $ilToolbar = $this->toolbar;
2078
2079 $ilTabs->setTabActive('view_content');
2080
2081 if (!in_array($_SESSION['clipboard']['cmd'], array('link', 'copy', 'cut'))) {
2082 $message = __METHOD__ . ": Unknown action.";
2083 $ilErr->raiseError($message, $ilErr->WARNING);
2084 }
2085 $cmd = $_SESSION['clipboard']['cmd'];
2086
2087 //
2088 $exp = $this->getTreeSelectorGUI($cmd);
2089 if ($exp->handleCommand()) {
2090 return;
2091 }
2092 $output = $exp->getHTML();
2093
2094 $txt_var = ($cmd == "copy")
2095 ? "copy"
2096 : "paste";
2097
2098 // toolbars
2099 $t = new ilToolbarGUI();
2100 $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
2101
2102 include_once("./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
2104 $b->setCaption($txt_var);
2105 $b->setCommand("performPasteIntoMultipleObjects");
2106
2107 //$t->addFormButton($this->lng->txt($txt_var), "performPasteIntoMultipleObjects");
2108 $t->addStickyItem($b);
2109
2110 $t->addSeparator();
2111 $this->lng->loadLanguageModule('obj');
2112 $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
2113
2114 $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
2115 $t->setCloseFormTag(false);
2116 $t->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), " ");
2117 $output = $t->getHTML() . $output;
2118 $t->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), " ");
2119 $t->setCloseFormTag(true);
2120 $t->setOpenFormTag(false);
2121 $output .= "<br />" . $t->getHTML();
2122
2123 $this->tpl->setContent($output);
2124 }
static getInstance()
Factory.

References $_SESSION, Vendor\Package\$b, $error, ilObjectGUI\$ilErr, $message, $tabs, $toolbar, ilUtil\getImagePath(), ilSubmitButton\getInstance(), and getTreeSelectorGUI().

Referenced by ilObjLearningSequenceGUI\executeCommand(), initAndDisplayCopyIntoMultipleObjectsObject(), initAndDisplayLinkIntoMultipleObjectsObject(), initAndDisplayMoveIntoObjectObject(), and performPasteIntoMultipleObjectsObject().

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

◆ showPermanentLink()

ilContainerGUI::showPermanentLink ( )

show permanent link

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

876 {
877 global $DIC;
878
879 $tpl = $DIC->ui()->mainTemplate();
880
881 $tpl->setPermanentLink(
882 $this->object->getType(),
883 $this->object->getRefId(),
884 "",
885 "_top"
886 );
887 }

References $DIC, and ilObjectGUI\$tpl.

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

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

552 {
553 if ($this->isActiveAdministrationPanel() || $this->isActiveOrdering()) {
554 return;
555 }
556 include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php";
557 $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
558 $gui->render();
559 }
Render add new item selector.

References isActiveAdministrationPanel(), and isActiveOrdering().

Referenced by renderObject().

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

◆ showTreeFlatIcon()

ilContainerGUI::showTreeFlatIcon ( )

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

506 {
508
509 // dont show icon, if role (permission gui->rolegui) is edited
510 if ($_GET["obj_id"] != "") {
511 return;
512 }
513 // hide for member view
514 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
515 if (ilMemberViewSettings::getInstance()->isActive()) {
516 return;
517 }
518
519 $mode = ($_SESSION["il_rep_mode"] == "flat")
520 ? "tree"
521 : "flat";
522 $link = "ilias.php?baseClass=ilRepositoryGUI&amp;cmd=frameset&amp;set_mode=" . $mode . "&amp;ref_id=" . $this->object->getRefId();
523 $tpl->setTreeFlatIcon($link, $mode);
524 }

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:

◆ supportsPageEditor()

ilContainerGUI::supportsPageEditor ( )
protected

Reimplemented in ilObjStudyProgrammeGUI.

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

662 : bool
663 {
664 return true;
665 }

Referenced by renderObject().

+ Here is the caller graph for this function:

◆ switchToOldEditorObject()

ilContainerGUI::switchToOldEditorObject ( )

Switch to old page editor.

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

904 {
905 $ilCtrl = $this->ctrl;
906
907 $_SESSION["il_cntr_editor"] = "old";
908 $ilCtrl->redirect($this, "editPageFrame");
909 }

References $_SESSION, and ilObjectGUI\$ctrl.

◆ switchToStdEditorObject()

ilContainerGUI::switchToStdEditorObject ( )

Switch to standard page editor.

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

893 {
894 $ilCtrl = $this->ctrl;
895
896 $_SESSION["il_cntr_editor"] = "std";
897 $ilCtrl->redirect($this, "editPageFrame");
898 }

References $_SESSION, and ilObjectGUI\$ctrl.

◆ trashApplyFilterObject()

ilContainerGUI::trashApplyFilterObject ( )

trash table apply filter

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

3577 {
3578 $this->trashHandleFilter(true, false);
3579 }
trashHandleFilter(bool $action_apply, bool $action_reset)

References trashHandleFilter().

+ Here is the call graph for this function:

◆ trashHandleFilter()

ilContainerGUI::trashHandleFilter ( bool  $action_apply,
bool  $action_reset 
)
protected
Parameters
bool$action_apply

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

3593 {
3594 $trash_table = new \ilTrashTableGUI($this, 'trash', $this->object->getRefId());
3595 $trash_table->init();
3596 $trash_table->resetOffset();
3597 if ($action_reset) {
3598 $trash_table->resetFilter();
3599 }
3600 if ($action_apply) {
3601 $trash_table->writeFilterToSession();
3602 }
3603 $this->trashObject();
3604 }
trashObject()
Show trash content of object.

References trashObject().

Referenced by trashApplyFilterObject(), and trashResetFilterObject().

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

◆ trashObject()

ilContainerGUI::trashObject ( )

Show trash content of object.

@access public

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

3557 {
3558 $this->checkPermission("write");
3559 $tpl = $this->tpl;
3560
3561 $this->tabs_gui->activateTab('trash');
3562
3563 $trash_table = new \ilTrashTableGUI($this, 'trash', $this->object->getRefId());
3564 $trash_table->init();
3565 $trash_table->parse();
3566
3567 $trash_table->setFilterCommand('trashApplyFilter');
3568 $trash_table->setResetCommand('trashResetFilter');
3569
3570 $tpl->setContent($trash_table->getHTML());
3571 }

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

Referenced by ilObjLearningSequenceGUI\executeCommand(), and trashHandleFilter().

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

◆ trashResetFilterObject()

ilContainerGUI::trashResetFilterObject ( )

trash table reset filter

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

3585 {
3586 $this->trashHandleFilter(false, true);
3587 }

References trashHandleFilter().

+ Here is the call graph for this function:

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

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

3635 {
3636 $ru = new ilRepUtilGUI($this);
3637 $ru->restoreObjects($_GET["ref_id"], $_POST["trash_id"]);
3638 $this->ctrl->redirect($this, "trash");
3639 }

References $_GET, and $_POST.

Referenced by ilObjLearningSequenceGUI\executeCommand().

+ Here is the caller graph for this function:

◆ useNewEditorObject()

ilContainerGUI::useNewEditorObject ( )

Use new editor (-> delete xhtml content page)

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

915 {
916 $ilCtrl = $this->ctrl;
917 $ilAccess = $this->access;
919 $ilCtrl = $this->ctrl;
920
921 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
922 include_once("./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
923
924 /* keep old page content for now...
925 $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
926 "xhtml_page");
927 if ($xpage_id)
928 {
929 $xpage = new ilXHTMLPage($xpage_id);
930 }
931 */
932
934 $this->object->getId(),
935 "xhtml_page",
936 0
937 );
938
939 ilUtil::sendSuccess($lng->txt("cntr_switched_editor"), true);
940 }
941
942 $ilCtrl->redirect($this, "editPageFrame");
943 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $access

◆ $app_event_handler

ilContainerGUI::$app_event_handler
protected

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

◆ $bl_cnt

ilContainerGUI::$bl_cnt = 1

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

◆ $container_filter_service

ilContainerGUI::$container_filter_service
protected

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

Referenced by initFilter().

◆ $container_user_filter

ilContainerGUI::$container_user_filter = null
protected

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

◆ $db

ilContainerGUI::$db
protected

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

◆ $error

◆ $global_screen

ilContainerGUI::$global_screen
protected

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

◆ $log

ilContainerGUI::$log
protected

◆ $multi_download_enabled

ilContainerGUI::$multi_download_enabled = false

Definition at line 103 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 61 of file class.ilContainerGUI.php.

Referenced by copyObject().

◆ $plugin_admin

ilContainerGUI::$plugin_admin
protected

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

Referenced by getAsynchItemListObject().

◆ $rbacadmin

ilContainerGUI::$rbacadmin
protected

◆ $rbacreview

◆ $rbacsystem

◆ $settings

◆ $tabs

◆ $toolbar

◆ $ui

ilContainerGUI::$ui
protected

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

Referenced by performPasteIntoMultipleObjectsObject().

◆ $ui_filter

ilContainerGUI::$ui_filter
protected

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

◆ $user


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